:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #f97316;
    --accent-2: #f59e0b;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 18% 0%, rgba(249, 115, 22, 0.22), transparent 34rem),
        radial-gradient(circle at 84% 12%, rgba(245, 158, 11, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

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(2, 6, 23, 0.76);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
    font-size: 15px;
}

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

.main-nav a {
    color: var(--soft);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
    background: rgba(249, 115, 22, 0.18);
    transform: translateY(-1px);
}

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

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

.hero-track {
    position: relative;
    min-height: 640px;
}

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

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

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 44%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.25) 0%, rgba(2, 6, 23, 0.88) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 48px;
    padding: 70px 0 96px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.16);
    border: 1px solid rgba(251, 146, 60, 0.28);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 20px 0 18px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-lead {
    max-width: 650px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
    margin: 0 0 28px;
}

.hero-actions,
.section-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: 12px 18px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 16px 36px rgba(249, 115, 22, 0.32);
}

.btn-ghost {
    color: #fff;
    background: rgba(15, 23, 42, 0.74);
    border-color: var(--line);
}

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

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

.hero-panel h2 {
    margin: 16px 0 6px;
    font-size: 22px;
}

.hero-panel p {
    margin: 0;
    color: var(--muted);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 5;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.hero-dot,
.hero-arrow {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-dot {
    width: 36px;
    height: 8px;
    border-radius: 999px;
    opacity: 0.52;
}

.hero-dot.is-active {
    opacity: 1;
    background: var(--accent);
}

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

.hero-arrow {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 20px;
}

.section {
    padding: 64px 0;
}

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

.section-title h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-title p,
.page-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.42);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease, filter 0.45s ease;
}

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

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.92);
    color: #fff;
    box-shadow: 0 15px 30px rgba(249, 115, 22, 0.34);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 40px;
    height: 32px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #fed7aa;
    font-size: 13px;
    margin-bottom: 8px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.32;
}

.card-body h3 a:hover {
    color: #fb923c;
}

.card-body p {
    margin: 0 0 12px;
    min-height: 46px;
    color: var(--muted);
    font-size: 14px;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.14);
    border: 1px solid rgba(249, 115, 22, 0.18);
    font-size: 12px;
}

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

.category-card {
    min-height: 170px;
    padding: 24px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.26), transparent 44%),
        rgba(15, 23, 42, 0.76);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.48);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

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

.page-hero {
    padding: 64px 0 28px;
}

.page-title {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at 78% 6%, rgba(249, 115, 22, 0.24), transparent 36%),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px 180px;
    gap: 12px;
    margin: 26px 0 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    color: #fff;
    background: rgba(2, 6, 23, 0.62);
    padding: 0 14px;
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(249, 115, 22, 0.72);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: start;
    padding-bottom: 28px;
}

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

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

.player-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: cover;
}

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.62));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 18px 45px rgba(249, 115, 22, 0.35);
    font-size: 30px;
    padding-left: 4px;
}

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

.detail-card {
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
    color: #fed7aa;
}

.detail-card h2,
.side-card h2 {
    margin: 26px 0 10px;
    font-size: 24px;
}

.detail-card p {
    color: var(--soft);
    margin: 0 0 16px;
}

.side-card {
    padding: 18px;
}

.side-card h2 {
    margin-top: 0;
}

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

.related-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.42);
    border: 1px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
    border-color: rgba(249, 115, 22, 0.44);
    transform: translateX(3px);
}

.related-item img {
    width: 72px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.related-item strong {
    display: block;
    line-height: 1.35;
}

.related-item span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.ranking-list {
    display: grid;
    gap: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 72px 86px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
}

.rank-num {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.95), rgba(245, 158, 11, 0.9));
    color: #fff;
    font-weight: 900;
}

.rank-row img {
    width: 86px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

.rank-row h3 {
    margin: 0 0 6px;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
}

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

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.site-footer p {
    color: var(--muted);
    margin: 8px 0 0;
    max-width: 680px;
}

.footer-links {
    display: flex;
    gap: 14px;
    color: var(--soft);
}

.hidden-by-filter {
    display: none !important;
}

@media (max-width: 1024px) {
    .hero-content,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        display: none;
    }

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

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

@media (max-width: 760px) {
    .nav-shell {
        min-height: 64px;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .main-nav.is-open {
        display: flex;
    }

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

    .hero-content {
        padding-top: 42px;
        padding-bottom: 92px;
    }

    .hero-controls {
        bottom: 22px;
    }

    .hero-arrows {
        display: none;
    }

    .section {
        padding: 44px 0;
    }

    .section-title,
    .footer-grid {
        flex-direction: column;
        align-items: flex-start;
    }

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

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

    .rank-row {
        grid-template-columns: 46px 70px minmax(0, 1fr);
    }

    .rank-row .btn {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .rank-num {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .container,
    .nav-shell,
    .hero-content,
    .hero-controls {
        width: min(100% - 22px, 1180px);
    }

    .brand {
        font-size: 18px;
    }

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

    .card-body p {
        min-height: auto;
    }
}
