:root {
    --bg: #f5f6fb;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --orange: #f97316;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
    box-shadow: 0 10px 35px rgba(2, 6, 23, 0.28);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
    font-size: 1.18rem;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-weight: 700;
}

.nav-link {
    color: rgba(255, 255, 255, 0.86);
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fbbf24;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav a {
    display: block;
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav.is-open {
    display: block;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: var(--slate-950);
}

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

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

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

.hero-backdrop,
.detail-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06);
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 78px;
    width: min(720px, calc(100% - 48px));
    color: #fff;
}

.hero-kicker,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 14px;
    padding: 6px 14px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(2.6rem, 6vw, 5.9rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 2vw, 1.28rem);
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(10px);
}

.movie-meta span {
    color: var(--muted);
    background: #f1f5f9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    min-height: 46px;
    padding: 0 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover {
    transform: translateY(-2px);
}

.ghost-button {
    min-height: 46px;
    padding: 0 20px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.text-button {
    color: var(--amber-dark);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.48);
    font-size: 2rem;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-arrow-left {
    left: 24px;
}

.hero-arrow-right {
    right: 24px;
}

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

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

.hero-dot.is-active {
    width: 32px;
    background: var(--amber);
}

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

.intro-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 42px;
    padding-bottom: 34px;
}

.intro-panel h2,
.section-heading h2,
.content-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.16;
}

.intro-panel p:not(.section-eyebrow) {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--muted);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

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

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--slate-800);
    box-shadow: var(--soft-shadow);
}

.category-tile img,
.category-overview-cover img,
.rank-cover img,
.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-tile:hover img,
.category-overview-card:hover img,
.rank-item:hover img,
.movie-card:hover .poster img {
    transform: scale(1.08);
}

.category-tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.2));
}

.category-tile strong,
.category-tile small {
    position: absolute;
    left: 18px;
    right: 18px;
    color: #fff;
}

.category-tile strong {
    bottom: 56px;
    font-size: 1.24rem;
}

.category-tile small {
    bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
}

.filter-panel {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(14px);
}

.search-box {
    flex: 1;
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

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

.search-box input:focus,
.filter-selects select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.filter-selects {
    display: flex;
    gap: 12px;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(245, 158, 11, 0.94);
    font-size: 0.82rem;
    font-weight: 800;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.movie-card-body {
    padding: 18px;
}

.movie-title {
    display: -webkit-box;
    min-height: 3em;
    overflow: hidden;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--amber-dark);
}

.movie-desc {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 10px 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-row a,
.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    font-size: 0.78rem;
    font-weight: 800;
}

.tag-row span {
    color: #475569;
    background: #f1f5f9;
}

.empty-tip {
    display: none;
    margin: 34px 0 0;
    padding: 18px;
    border-radius: 18px;
    color: var(--muted);
    background: #fff;
    text-align: center;
}

.empty-tip.is-visible {
    display: block;
}

.rank-section {
    padding-top: 28px;
}

.rank-list {
    display: grid;
    gap: 16px;
}

.compact-rank {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-item {
    display: grid;
    grid-template-columns: 118px 62px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.rank-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: var(--slate-800);
}

.rank-number {
    color: var(--amber-dark);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.rank-title {
    display: inline-block;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 900;
}

.rank-title:hover {
    color: var(--amber-dark);
}

.rank-copy p {
    display: -webkit-box;
    margin: 6px 0 10px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 380px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.88)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.28), transparent 36%);
}

.page-hero > div {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 88px 0 72px;
}

.page-hero h1 {
    max-width: 760px;
    margin: 0 0 16px;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.08rem;
}

.slim-hero {
    min-height: 300px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 18px;
    overflow: hidden;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.category-overview-cover {
    min-height: 180px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--slate-800);
}

.category-overview-card h2 {
    margin: 4px 0 8px;
}

.category-overview-card p {
    margin: 0 0 12px;
    color: var(--muted);
}

.category-overview-card ul {
    margin: 0 0 14px;
    padding-left: 18px;
    color: var(--muted);
}

.category-overview-card li a:hover {
    color: var(--amber-dark);
}

.movie-detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 590px;
    color: #fff;
    background: var(--slate-950);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.46;
    filter: blur(1px) saturate(1.08);
}

.detail-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.3)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 62%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 82px 0 68px;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 42px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 26px;
    background: var(--slate-800);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-copy h1 {
    max-width: 780px;
    margin: 0 0 16px;
    font-size: clamp(2.3rem, 5vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.detail-copy p {
    max-width: 760px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.08rem;
}

.detail-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.watch-shell {
    padding-top: 42px;
}

.watch-stage {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.34);
    aspect-ratio: 16 / 9;
}

.video-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.player-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.42));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.watch-stage.is-ready .player-layer {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-orb {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding-left: 6px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-size: 2rem;
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.38);
}

.player-layer strong {
    max-width: 80%;
    font-size: 1.28rem;
}

.detail-text {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding-top: 24px;
}

.content-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.content-card h2 {
    margin-bottom: 14px;
    font-size: 1.48rem;
}

.content-card p {
    margin: 0;
    color: #334155;
    text-align: justify;
}

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

.searchable-card.is-hidden {
    display: none;
}

@media (max-width: 1024px) {
    .desktop-nav {
        gap: 14px;
        font-size: 0.92rem;
    }

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

    .compact-rank,
    .category-overview-grid,
    .detail-text {
        grid-template-columns: 1fr;
    }

    .detail-hero-inner {
        grid-template-columns: 240px 1fr;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .hero {
        min-height: 74vh;
    }

    .hero-content {
        left: 18px;
        right: 18px;
        bottom: 74px;
        width: auto;
    }

    .hero h1 {
        font-size: 2.7rem;
    }

    .hero-arrow {
        display: none;
    }

    .intro-panel,
    .section-heading,
    .filter-panel {
        display: grid;
        align-items: stretch;
    }

    .filter-selects {
        display: grid;
    }

    .category-grid,
    .movie-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .rank-item {
        grid-template-columns: 94px 44px 1fr;
        gap: 12px;
    }

    .rank-number {
        font-size: 1.38rem;
    }

    .category-overview-card,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(250px, 74vw);
    }

    .movie-detail-hero {
        min-height: auto;
    }

    .detail-copy h1 {
        font-size: 2.55rem;
    }

    .content-card {
        padding: 22px;
    }
}

@media (max-width: 520px) {
    .nav-shell,
    .mobile-nav,
    .section-shell,
    .page-hero > div,
    .detail-hero-inner {
        width: min(100% - 24px, 1180px);
    }

    .brand-text {
        font-size: 1rem;
    }

    .hero-actions {
        display: grid;
    }

    .category-grid,
    .movie-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 88px 1fr;
    }

    .rank-number {
        grid-row: 1;
        grid-column: 1;
        align-self: start;
        justify-self: start;
        margin: 8px;
        padding: 2px 8px;
        border-radius: 999px;
        color: #fff;
        background: rgba(245, 158, 11, 0.92);
        font-size: 0.9rem;
    }

    .rank-copy {
        grid-column: 2;
    }
}
