:root {
    --page-bg: #f7f7fb;
    --card-bg: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f3f4f6;
    --line: #e5e7eb;
    --brand: #dc2626;
    --brand-dark: #b91c1c;
    --accent: #db2777;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, #f9fafb 0%, #eef2ff 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.32);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 22px;
}

.brand-text small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand);
    background: #fee2e2;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--soft);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #374151;
}

.mobile-menu {
    display: none;
    border-top: 1px solid var(--line);
}

.mobile-menu.open {
    display: block;
}

.mobile-menu-inner {
    padding: 14px 0 18px;
    display: grid;
    gap: 10px;
}

.mobile-sub-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-sub-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f9fafb;
    color: #4b5563;
}

.hero {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: #111827;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 76% 32%, rgba(219, 39, 119, 0.32), transparent 32%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.78)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.92), transparent 54%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 76px;
}

.hero-copy {
    width: min(680px, 100%);
    color: #fff;
}

.hero-tags,
.detail-tags,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span:first-child {
    background: var(--brand);
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

.hero-one {
    margin: 0 0 10px;
    font-size: clamp(18px, 2.1vw, 25px);
    color: #f3f4f6;
}

.hero-summary {
    margin: 0 0 28px;
    color: #d1d5db;
    font-size: 16px;
    line-height: 1.8;
}

.hero-actions,
.detail-title-row,
.quick-search-inner,
.section-heading,
.page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.btn,
.site-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.site-search button:hover {
    transform: translateY(-2px);
}

.btn-primary,
.site-search button {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.28);
}

.btn-glass {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.btn-white {
    color: var(--brand);
    background: #fff;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 3;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dot.active {
    width: 34px;
    background: #fff;
}

.quick-search {
    padding: 26px 0;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.quick-search p,
.section-heading p,
.page-hero p {
    margin: 0 0 8px;
    color: var(--brand);
    font-weight: 800;
}

.quick-search h2,
.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(26px, 3.5vw, 44px);
    letter-spacing: -0.03em;
}

.site-search {
    width: min(520px, 100%);
    display: flex;
    gap: 12px;
}

.site-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

.site-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.14);
}

.section-block {
    padding: 54px 0;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading a {
    color: var(--brand);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

.movie-grid-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
    min-width: 0;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius);
    background: #111827;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease, filter 0.32s ease;
}

.movie-card:hover img {
    transform: scale(1.08);
    filter: brightness(0.78);
}

.play-mark,
.big-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.play-mark {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #111827;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.78);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.year-badge {
    right: 10px;
    background: rgba(220, 38, 38, 0.88);
}

.rank-badge {
    left: 10px;
    background: rgba(17, 24, 39, 0.76);
}

.movie-card-body {
    padding: 12px 3px 0;
}

.movie-card h2 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h2 a:hover {
    color: var(--brand);
}

.movie-card p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta span {
    padding: 4px 7px;
    border-radius: 999px;
    color: #4b5563;
    background: #f3f4f6;
    font-size: 12px;
}

.rank-list-home {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.category-band {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: #fff;
}

.category-band .section-heading p,
.category-band .section-heading a {
    color: #fecaca;
}

.category-grid,
.overview-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.category-tile,
.overview-card a {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 190px;
    border-radius: 22px;
    background: #111827;
    box-shadow: var(--shadow);
}

.category-tile img,
.overview-card img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.32s ease, opacity 0.32s ease;
}

.category-tile:hover img,
.overview-card:hover img {
    opacity: 0.42;
    transform: scale(1.08);
}

.category-tile span,
.category-tile small,
.overview-card div {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-tile span {
    bottom: 68px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile small {
    bottom: 18px;
    color: #e5e7eb;
    line-height: 1.5;
}

.page-main {
    min-height: 60vh;
}

.page-hero {
    margin-top: 34px;
    padding: 38px;
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.2), transparent 22%),
        linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: var(--shadow);
}

.compact-hero,
.category-hero,
.ranking-hero {
    min-height: 210px;
}

.page-hero span {
    display: block;
    max-width: 720px;
    margin-top: 12px;
    color: #ffe4e6;
    line-height: 1.8;
}

.overview-card div {
    bottom: 22px;
    color: #fff;
}

.overview-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.overview-card p {
    margin: 0 0 12px;
    color: #e5e7eb;
    line-height: 1.55;
}

.overview-card span {
    color: #fecaca;
    font-weight: 800;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr;
    gap: 14px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #374151;
    font-weight: 800;
}

.filter-panel label span {
    font-size: 13px;
}

.breadcrumb {
    padding-top: 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--brand);
}

.detail-layout {
    padding-top: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-content,
.detail-side,
.side-info {
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.26));
    cursor: pointer;
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.big-play {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    color: var(--brand);
    background: rgba(255, 255, 255, 0.92);
    font-size: 34px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.player-cover strong {
    font-size: 20px;
}

.detail-content {
    margin-top: 24px;
    padding: 28px;
}

.detail-title-row {
    align-items: flex-start;
}

.detail-title-row p {
    margin: 0 0 8px;
    color: var(--brand);
    font-weight: 800;
}

.detail-title-row h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.14;
}

.detail-tags {
    margin: 18px 0 26px;
}

.detail-tags span {
    color: #991b1b;
    background: #fee2e2;
}

.detail-content h2 {
    margin: 28px 0 12px;
    font-size: 24px;
}

.detail-content p {
    margin: 0;
    color: #374151;
    line-height: 2;
    font-size: 16px;
}

.text-link-cloud {
    margin-top: 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.text-link-cloud a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--brand);
    background: #fff1f2;
    font-weight: 800;
}

.detail-side {
    position: sticky;
    top: 92px;
    overflow: hidden;
}

.detail-side > img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.side-info {
    padding: 22px;
    box-shadow: none;
}

.side-info h2 {
    margin: 0 0 14px;
}

.side-info p {
    margin: 0;
    padding: 13px 0;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid var(--line);
    color: #374151;
}

.side-info span {
    color: var(--muted);
}

.site-footer {
    margin-top: 40px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
}

.footer-brand {
    color: #fff;
    font-size: 20px;
}

.site-footer p {
    max-width: 360px;
    line-height: 1.7;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 10px 0;
    color: #d1d5db;
}

.site-footer a:hover {
    color: #fff;
}

.footer-bottom {
    padding: 18px 16px;
    display: flex;
    justify-content: center;
    gap: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #9ca3af;
}

.hidden-card {
    display: none !important;
}

@media (max-width: 1100px) {
    .movie-grid-6 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .rank-list-home,
    .movie-grid-4,
    .category-grid,
    .overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
        display: grid;
        grid-template-columns: 220px 1fr;
    }
}

@media (max-width: 780px) {
    .main-nav {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .brand-text small {
        display: none;
    }

    .hero {
        min-height: 620px;
        height: 82vh;
    }

    .hero-content {
        padding-bottom: 86px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search-inner,
    .section-heading,
    .page-hero,
    .detail-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-search {
        flex-direction: column;
    }

    .movie-grid-6,
    .movie-grid-4,
    .rank-list-home,
    .category-grid,
    .overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-side {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .movie-grid-6,
    .movie-grid-4,
    .rank-list-home,
    .category-grid,
    .overview-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-hero,
    .detail-content {
        padding: 24px;
    }

    .movie-card h2 {
        font-size: 15px;
    }

    .footer-grid,
    .footer-bottom {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}
