* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-solid: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --subtle: #cbd5e1;
    --accent: #f59e0b;
    --accent-2: #fb923c;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34rem),
        radial-gradient(circle at 85% 15%, rgba(249, 115, 22, 0.12), transparent 32rem),
        var(--bg);
    color: var(--text);
}

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

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

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

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.35);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--subtle);
    font-size: 15px;
}

.site-nav a {
    position: relative;
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: #ffffff;
}

.site-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 8px 11px;
    background: rgba(148, 163, 184, 0.12);
    color: #fff;
    font-size: 20px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-bg,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.3) 100%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.08);
}

.hero-bg::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.22), transparent 24rem),
        linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 720px;
    margin: 0 auto;
    padding: 84px 22px 94px;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) 380px;
    align-items: center;
    gap: 52px;
}

.hero-copy,
.detail-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.hero h2 {
    margin: 24px 0 14px;
    font-size: clamp(26px, 3.2vw, 42px);
}

.hero p,
.page-hero p,
.detail-copy p,
.detail-section p {
    color: var(--subtle);
    line-height: 1.9;
    font-size: 17px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span {
    border: 1px solid rgba(245, 158, 11, 0.32);
    color: #fde68a;
    background: rgba(245, 158, 11, 0.08);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
}

.tag-row.large span {
    font-size: 13px;
    padding: 7px 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    color: #111827;
    box-shadow: 0 14px 38px rgba(245, 158, 11, 0.28);
}

.btn.ghost {
    border: 1px solid rgba(226, 232, 240, 0.2);
    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;
}

.hero-poster {
    position: relative;
    aspect-ratio: 3 / 4.2;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 34px;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(15, 23, 42, 0.5));
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.hero-dots button {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dots button.active {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.search-panel,
.section,
.page-hero,
.detail-section,
.player-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 22px;
}

.search-panel {
    margin-top: 26px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.search-panel strong {
    display: block;
    margin-bottom: 4px;
    font-size: 20px;
}

.search-panel span {
    color: var(--muted);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(226, 232, 240, 0.14);
    border-radius: 999px;
    padding: 0 18px;
    background: rgba(2, 6, 23, 0.72);
    color: #fff;
    outline: none;
}

.search-panel.filters {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 360px) minmax(170px, 240px);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
}

.section-head a {
    color: #fbbf24;
    font-weight: 800;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(15, 23, 42, 0.92);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(30, 41, 59, 0.9));
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.poster-glow {
    position: absolute;
    inset: 12px;
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.movie-info {
    padding: 16px;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #fcd34d;
    font-size: 12px;
    font-weight: 800;
}

.movie-info h3 {
    margin: 10px 0 8px;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
}

.movie-info p {
    min-height: 52px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

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

.category-card,
.category-overview-item {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.category-cover {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.95)),
        var(--cover);
    background-size: cover;
    background-position: center;
    opacity: 0.42;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.category-card:hover .category-cover {
    opacity: 0.62;
    transform: scale(1.06);
}

.category-card strong,
.category-card em,
.category-index {
    position: relative;
    z-index: 2;
}

.category-card strong {
    display: block;
    margin-top: 74px;
    font-size: 24px;
}

.category-card em {
    display: block;
    margin-top: 10px;
    color: var(--subtle);
    font-style: normal;
    line-height: 1.7;
}

.category-index {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
    font-weight: 900;
}

.page-hero.compact {
    padding-top: 80px;
    padding-bottom: 42px;
}

.page-hero.compact h1 {
    max-width: 860px;
}

.page-hero.compact p {
    max-width: 760px;
}

.category-overview {
    display: grid;
    gap: 16px;
}

.category-overview-item {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.category-overview-item span {
    color: #fbbf24;
    font-weight: 900;
}

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

.category-overview-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.detail-backdrop {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.42)),
        var(--detail-cover);
    background-size: cover;
    background-position: center;
}

.detail-layout {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 620px;
    padding: 76px 22px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: center;
    gap: 48px;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4.2;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.86));
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

.detail-meta {
    margin: 18px 0 16px;
}

.player-wrap {
    padding-top: 46px;
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(245, 158, 11, 0.26);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.42));
    color: #111827;
    cursor: pointer;
}

.player-start span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
    font-size: 32px;
    padding-left: 5px;
}

.player-start.hidden {
    display: none;
}

.detail-section {
    padding-top: 18px;
    padding-bottom: 18px;
}

.detail-section h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.related-section {
    padding-top: 30px;
}

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

.site-footer {
    margin-top: 60px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 22px;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 32px;
}

.footer-logo {
    margin-bottom: 14px;
    font-size: 22px;
}

.site-footer p,
.site-footer a {
    color: var(--muted);
    line-height: 1.8;
}

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

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

.footer-links a:hover {
    color: #fbbf24;
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 20px;
    text-align: center;
    color: #64748b;
}

.movie-card.hidden-by-filter {
    display: none;
}

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

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

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

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

    .hero-poster,
    .detail-poster {
        max-width: 340px;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a.active::after {
        display: none;
    }

    .hero,
    .hero-content {
        min-height: 760px;
    }

    .search-panel,
    .search-panel.filters {
        grid-template-columns: 1fr;
    }

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

    .section-head,
    .category-overview-item,
    .footer-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-grid {
        display: grid;
    }
}

@media (max-width: 520px) {
    .header-inner {
        padding: 0 14px;
    }

    .brand span:last-child {
        font-size: 16px;
    }

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

    .hero-content {
        padding-top: 54px;
        gap: 28px;
    }

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .detail-layout {
        padding-top: 52px;
    }

    .player-box {
        border-radius: 18px;
    }
}
