:root {
    color-scheme: dark;
    --bg: #07070b;
    --bg-soft: #11111a;
    --panel: rgba(22, 22, 32, 0.76);
    --panel-strong: rgba(18, 18, 26, 0.94);
    --line: rgba(255, 255, 255, 0.12);
    --text: #f8fafc;
    --muted: #a8b0c2;
    --gold: #f8c43a;
    --gold-strong: #f59e0b;
    --rose: #f43f5e;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(248, 196, 58, 0.16), transparent 36rem),
        radial-gradient(circle at 85% 12%, rgba(244, 63, 94, 0.12), transparent 34rem),
        linear-gradient(180deg, #09090f 0%, #050507 46%, #0b0b12 100%);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 7, 11, 0.76);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #171103;
    background: linear-gradient(135deg, var(--gold), #fff2a8 48%, var(--gold-strong));
    box-shadow: 0 14px 42px rgba(248, 196, 58, 0.32);
}

.brand-text {
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.mobile-link {
    color: var(--muted);
    border-radius: 999px;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-strong);
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 14px;
}

.hero-carousel {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.04);
    transform: scale(1.02);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 7, 11, 0.98) 0%, rgba(7, 7, 11, 0.78) 35%, rgba(7, 7, 11, 0.38) 68%, rgba(7, 7, 11, 0.82) 100%),
        linear-gradient(0deg, var(--bg) 0%, transparent 44%);
}

.hero-copy {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    min-height: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1240px;
    padding: 96px 0 112px;
}

.hero-kicker,
.eyebrow {
    color: var(--gold);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 820px;
    margin: 18px 0 18px;
    font-size: clamp(46px, 8vw, 96px);
    line-height: 0.96;
    letter-spacing: -0.07em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0;
    color: #d8deea;
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.7;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-tags span,
.detail-tags span {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #fff8d4;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn,
.search-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn,
.search-panel button {
    color: #171103;
    border: 0;
    background: linear-gradient(135deg, var(--gold), #fff1a5 50%, var(--gold-strong));
    box-shadow: 0 20px 42px rgba(248, 196, 58, 0.28);
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 38px;
    z-index: 4;
    width: min(1240px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-arrow,
.hero-dot {
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text);
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(14px);
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    font-size: 30px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 10px;
    border-radius: 99px;
}

.hero-dot.active {
    width: 58px;
    background: var(--gold);
}

.section-wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.narrow-wrap {
    width: min(980px, calc(100% - 32px));
}

.section-heading {
    margin: 0 auto 34px;
    text-align: center;
    max-width: 720px;
}

.left-heading {
    margin-left: 0;
    text-align: left;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 10px 0 12px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.section-heading p,
.page-hero p,
.content-card p,
.category-main-link p,
.category-tile p,
.footer-grid p {
    color: var(--muted);
    line-height: 1.8;
}

.intro-search,
.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
    gap: 34px;
    align-items: start;
}

.search-panel,
.filter-bar {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.search-panel input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    outline: none;
    padding: 0 18px;
}

.filter-bar {
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.filter-bar input {
    flex: 1 1 280px;
}

.filter-bar select {
    flex: 0 0 170px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.18);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(248, 196, 58, 0.42);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.32);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #15151d;
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.06);
}

.score-badge,
.play-dot {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
}

.score-badge {
    top: 12px;
    right: 12px;
    min-width: 48px;
    height: 32px;
    color: #171103;
    background: var(--gold);
}

.play-dot {
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    transform: translate(-50%, -50%) scale(0.82);
    color: #171103;
    background: rgba(248, 196, 58, 0.92);
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
}

.card-body h3 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

.card-body p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: 70px;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.65;
}

.compact-card .card-body p {
    -webkit-line-clamp: 2;
    min-height: 52px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 56px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.055);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.large-rank .rank-row {
    grid-template-columns: 84px 64px 1fr;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(248, 196, 58, 0.38);
}

.rank-row img {
    width: 72px;
    height: 96px;
    border-radius: 16px;
    object-fit: cover;
    background: #15151d;
}

.large-rank .rank-row img {
    width: 84px;
    height: 112px;
}

.rank-num {
    color: var(--gold);
    font-size: 24px;
    font-weight: 950;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
}

.rank-info em {
    margin-top: 6px;
    color: var(--muted);
    font-style: normal;
}

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

.category-tile,
.category-overview-card {
    display: block;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(248, 196, 58, 0.12), transparent 46%),
        rgba(255, 255, 255, 0.055);
}

.category-tile span,
.category-main-link span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile p,
.category-main-link p {
    margin: 10px 0 0;
}

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

.mini-links {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.mini-links a {
    color: var(--gold);
}

.page-hero {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 86px 0 34px;
}

.small-hero > div {
    padding: 48px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 100% 0%, rgba(248, 196, 58, 0.18), transparent 28rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
    box-shadow: var(--shadow);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.1);
    transform: scale(1.06);
    opacity: 0.42;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 7, 11, 0.96), rgba(7, 7, 11, 0.72), rgba(7, 7, 11, 0.95)),
        linear-gradient(0deg, var(--bg), transparent 58%);
}

.detail-inner {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0 70px;
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    gap: 46px;
    align-items: center;
}

.detail-poster {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin-bottom: 18px;
}

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

.detail-one-line {
    max-width: 800px;
    color: #d8deea;
    font-size: 20px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-meta span {
    padding: 9px 13px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.09);
    color: #fff8d4;
    font-weight: 800;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #171103;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.44));
    cursor: pointer;
}

.play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 24px 70px rgba(248, 196, 58, 0.32);
    font-size: 32px;
    transform: translateX(3px);
}

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

.content-card {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.content-card p {
    margin: 0;
}

.site-footer {
    margin-top: 48px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.24);
}

.footer-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 34px;
}

.footer-brand {
    margin-bottom: 16px;
}

.footer-grid h3 {
    margin: 0 0 14px;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 34px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

[data-card].hidden {
    display: none;
}

@media (max-width: 1060px) {
    .movie-grid,
    .dense-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .featured-grid,
    .split-section,
    .intro-search,
    .detail-content {
        grid-template-columns: 1fr;
    }

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

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel,
    .hero-copy {
        min-height: 660px;
    }

    .hero-copy {
        padding-top: 72px;
    }

    .hero-controls {
        bottom: 22px;
    }

    .section-wrap {
        padding: 48px 0;
    }

    .search-panel,
    .filter-bar {
        flex-direction: column;
        border-radius: 22px;
    }

    .filter-bar select {
        flex-basis: auto;
    }

    .movie-grid,
    .featured-grid,
    .dense-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .card-body {
        padding: 14px;
    }

    .card-body h3 {
        font-size: 16px;
    }

    .card-body p {
        font-size: 13px;
        min-height: 64px;
    }

    .small-hero > div {
        padding: 30px;
    }

    .detail-inner {
        grid-template-columns: 1fr;
        padding-top: 42px;
    }

    .detail-poster {
        max-width: 280px;
    }

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

@media (max-width: 460px) {
    .header-inner {
        height: 68px;
    }

    .brand-text {
        font-size: 17px;
    }

    .movie-grid,
    .featured-grid,
    .dense-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .rank-row,
    .large-rank .rank-row {
        grid-template-columns: 62px 48px 1fr;
    }

    .rank-row img,
    .large-rank .rank-row img {
        width: 62px;
        height: 84px;
    }

    .hero-actions {
        flex-direction: column;
    }
}
