:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --border: rgba(148, 163, 184, 0.18);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --faint: #64748b;
    --white: #ffffff;
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 12%, rgba(245, 158, 11, 0.18), transparent 26rem),
        radial-gradient(circle at 86% 26%, rgba(59, 130, 246, 0.14), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    -webkit-font-smoothing: antialiased;
}

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

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

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.nav-wrap {
    width: min(1280px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo, .footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: var(--white);
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.28);
}

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

.nav-link {
    padding: 10px 15px;
    border-radius: 14px;
    color: #cbd5e1;
    transition: 0.22s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--white);
    background: rgba(51, 65, 85, 0.72);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.74);
    color: var(--white);
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    margin: 4px auto;
    display: block;
    border-radius: 2px;
    background: var(--white);
}

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

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

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

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

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.08);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.30) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 70vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
    align-items: center;
    gap: 56px;
    padding: 64px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 999px;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
}

.hero h1 {
    max-width: 820px;
    margin: 0 0 20px;
    font-size: clamp(42px, 6vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    color: var(--white);
    text-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions, .section-actions, .detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.38);
    background: rgba(30, 41, 59, 0.88);
}

.btn.primary {
    border-color: transparent;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.28);
}

.hero-panel {
    align-self: end;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.66);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 18px;
}

.hero-panel strong {
    display: block;
    margin-bottom: 8px;
    color: var(--white);
    font-size: 20px;
}

.hero-meta, .card-meta, .detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.hero-meta span, .card-meta span, .detail-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.82);
}

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

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
    transition: 0.2s ease;
}

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

main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 72px 0 0;
}

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

.section-title {
    margin: 0;
    color: var(--white);
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-subtitle {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.30);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.9);
}

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

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

.poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.88));
}

.play-dot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #111827;
    background: #fbbf24;
    opacity: 0;
    transform: translateY(8px);
    transition: 0.22s ease;
}

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    color: #111827;
    background: linear-gradient(135deg, #fef3c7, #f59e0b);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 12px 0 8px;
    color: var(--white);
    font-size: 17px;
    line-height: 1.35;
}

.card-body p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #fcd34d;
    background: var(--amber-soft);
    font-size: 12px;
}

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

.category-card {
    min-height: 190px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(59, 130, 246, 0.07)),
        rgba(15, 23, 42, 0.64);
    transition: 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.34);
}

.category-card h3 {
    margin: 0 0 10px;
    color: var(--white);
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.category-card span {
    display: inline-flex;
    margin-top: 24px;
    color: #fcd34d;
    font-weight: 700;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 70px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.56);
    transition: 0.22s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.30);
    background: rgba(30, 41, 59, 0.72);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.rank-item img {
    width: 70px;
    height: 94px;
    object-fit: cover;
    border-radius: 14px;
}

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

.rank-info strong {
    color: var(--white);
    margin-bottom: 8px;
}

.rank-info em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    padding: 76px 0 24px;
}

.page-hero h1 {
    max-width: 900px;
    margin: 0 0 16px;
    color: var(--white);
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.page-hero p {
    max-width: 800px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

.filter-panel {
    margin: 28px 0 28px;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 1.2fr;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.64);
}

.search-box {
    display: grid;
    gap: 8px;
    color: var(--muted);
}

.search-box input, .filter-controls select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    background: rgba(2, 6, 23, 0.56);
}

.search-box input {
    padding: 0 14px;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.filter-controls select {
    padding: 0 12px;
}

.breadcrumb {
    padding: 24px 0 0;
    color: var(--muted);
}

.breadcrumb a {
    color: #fcd34d;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    padding: 28px 0 64px;
}

.player-card, .detail-card, .side-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: var(--white);
    background: rgba(2, 6, 23, 0.34);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #111827;
    font-size: 30px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 24px 60px rgba(245, 158, 11, 0.42);
}

.player-status {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    color: #f8fafc;
    text-align: center;
    font-size: 14px;
}

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

.detail-card h1 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.detail-card h2, .side-card h2 {
    margin: 28px 0 12px;
    color: var(--white);
    font-size: 22px;
}

.detail-card p {
    margin: 0 0 16px;
    color: #cbd5e1;
    line-height: 1.9;
}

.side-card {
    padding: 18px;
    margin-bottom: 20px;
}

.side-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 18px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px 12px;
    margin: 0;
    color: var(--muted);
}

.side-card dt {
    color: var(--faint);
}

.side-card dd {
    margin: 0;
    color: var(--text);
}

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

.related-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.50);
    transition: 0.2s ease;
}

.related-item:hover {
    background: rgba(51, 65, 85, 0.72);
}

.related-item img {
    width: 64px;
    height: 84px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0;
}

.related-item strong {
    display: block;
    color: var(--white);
    margin-bottom: 6px;
}

.related-item span {
    color: var(--muted);
    font-size: 13px;
}

.empty-state {
    display: none;
    padding: 48px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    background: rgba(15, 23, 42, 0.56);
}

.empty-state.show {
    display: block;
}

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

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 28px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
}

.site-footer p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 16px;
    color: var(--white);
}

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

.footer-links a {
    color: var(--muted);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 30px;
    border-top: 1px solid var(--border);
    color: var(--faint);
    font-size: 14px;
}

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

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

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content {
        padding: 48px 0 80px;
    }

    .hero-panel {
        display: none;
    }

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

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

@media (max-width: 560px) {
    .nav-wrap, main, .footer-grid, .footer-bottom, .mobile-nav {
        width: min(100% - 22px, 1280px);
    }

    .hero-content {
        width: min(100% - 22px, 1280px);
    }

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

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .rank-item img {
        width: 58px;
        height: 78px;
    }

    .player-button {
        width: 68px;
        height: 68px;
    }
}
