:root {
    color-scheme: dark;
    --bg: #090d15;
    --panel: #111827;
    --panel-soft: rgba(17, 24, 39, 0.76);
    --line: rgba(255, 255, 255, 0.09);
    --muted: #9ca3af;
    --text: #f9fafb;
    --accent: #f97316;
    --accent-strong: #ef4444;
    --gold: #facc15;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 30vw),
        radial-gradient(circle at 80% 10%, rgba(239, 68, 68, 0.15), transparent 28vw),
        linear-gradient(180deg, #111827 0%, #090d15 52%, #05070b 100%);
}

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: 60;
    border-bottom: 1px solid var(--line);
    background: rgba(9, 13, 21, 0.92);
    backdrop-filter: blur(18px);
}

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

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

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.32);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 10px 16px;
    border-radius: 12px;
    color: #d1d5db;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.95), rgba(239, 68, 68, 0.95));
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #fff;
    background: rgba(31, 41, 55, 0.78);
}

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

.hero {
    position: relative;
    min-height: 78vh;
    display: grid;
    align-items: center;
    padding: 46px 0 34px;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    border: 1px solid var(--line);
    border-radius: 30px;
    overflow: hidden;
    background: #0b1020;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
    gap: 30px;
    align-items: center;
    padding: 74px 72px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(9, 13, 21, 0.94) 0%, rgba(9, 13, 21, 0.72) 48%, rgba(9, 13, 21, 0.25) 100%),
        var(--hero-image) center / cover no-repeat;
    opacity: 0.98;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(5, 7, 11, 0.92), transparent 42%, rgba(5, 7, 11, 0.14));
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(249, 115, 22, 0.35);
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.14);
    font-size: 13px;
    font-weight: 800;
}

.hero h1 {
    margin: 22px 0 16px;
    max-width: 780px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -2px;
}

.hero p {
    max-width: 700px;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.75;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    font-weight: 800;
    color: #fff;
    background: rgba(31, 41, 55, 0.78);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.28);
}

.hero-tags {
    margin-top: 22px;
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(17, 24, 39, 0.64);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
}

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

.hero-poster-card span {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #111827;
    background: var(--gold);
    font-weight: 900;
}

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #fff;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(12px);
}

.hero-control.prev {
    left: 20px;
}

.hero-control.next {
    right: 20px;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 72px;
    bottom: 34px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 28px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

.hero-dot.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.search-panel {
    position: relative;
    z-index: 5;
    margin: -64px auto 28px;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-panel input,
.search-box input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #fff;
    background: rgba(9, 13, 21, 0.78);
    outline: none;
}

.search-panel input:focus,
.search-box input:focus {
    border-color: rgba(249, 115, 22, 0.8);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.section {
    padding: 42px 0;
}

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

.section-head h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.1;
}

.section-head p,
.page-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-link {
    flex: none;
    color: #fed7aa;
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.78);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

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

.score {
    position: absolute;
    right: 10px;
    top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    color: #111827;
    background: var(--gold);
    font-size: 13px;
    font-weight: 900;
}

.card-body {
    padding: 14px;
}

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

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

.card-body p {
    min-height: 44px;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.65;
}

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

.tag {
    display: inline-flex;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.13);
    font-size: 12px;
    white-space: nowrap;
}

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

.category-card {
    min-height: 168px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(239, 68, 68, 0.08)),
        rgba(17, 24, 39, 0.78);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

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

.category-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.7;
}

.page-hero {
    padding: 62px 0 34px;
}

.page-title {
    max-width: 820px;
}

.search-box {
    margin: 22px 0 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.78);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 62px 86px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.78);
}

.rank-num {
    font-size: 28px;
    font-weight: 900;
    color: #fed7aa;
    text-align: center;
}

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

.rank-row h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.rank-row p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.65;
}

.rank-score {
    padding: 8px 12px;
    border-radius: 999px;
    color: #111827;
    background: var(--gold);
    font-weight: 900;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 30px;
    padding: 38px 0 44px;
}

.player-card,
.detail-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(17, 24, 39, 0.78);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.74));
}

.play-overlay span {
    position: relative;
    z-index: 2;
}

.play-icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.38);
    font-size: 28px;
}

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

.detail-content {
    padding: 24px;
}

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

.detail-content h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.12;
}

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

.detail-meta span {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(9, 13, 21, 0.48);
}

.detail-content h2,
.detail-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.detail-content p,
.detail-card p {
    color: #d1d5db;
    line-height: 1.85;
}

.detail-card {
    padding: 22px;
}

.side-poster img {
    width: 100%;
    border-radius: 20px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

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

.related-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(9, 13, 21, 0.45);
}

.related-item img {
    width: 64px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
}

.related-item h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.related-item p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.site-footer {
    margin-top: 44px;
    border-top: 1px solid var(--line);
    background: rgba(5, 7, 11, 0.72);
}

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.2fr 0.6fr 0.6fr;
    gap: 30px;
}

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

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

.footer-grid a:not(.brand) {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

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

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 58px 44px 92px;
    }

    .hero-poster {
        display: none;
    }

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

@media (max-width: 760px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        position: absolute;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(9, 13, 21, 0.96);
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        display: block;
        padding: 13px 14px;
    }

    .hero {
        min-height: auto;
        padding-top: 24px;
    }

    .hero-slider {
        min-height: 560px;
        border-radius: 22px;
    }

    .hero-slide {
        padding: 44px 24px 88px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-dots {
        left: 24px;
    }

    .hero-control {
        display: none;
    }

    .search-panel {
        margin: 20px 0 16px;
        grid-template-columns: 1fr;
    }

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

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

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

    .rank-row {
        grid-template-columns: 42px 66px 1fr;
    }

    .rank-row img {
        width: 66px;
    }

    .rank-score {
        display: none;
    }

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