:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #06b6d4;
    --blue: #3b82f6;
    --yellow: #facc15;
    --red: #f87171;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 5%, rgba(6, 182, 212, 0.18), transparent 34rem),
        radial-gradient(circle at 82% 12%, rgba(59, 130, 246, 0.18), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.nav-wrap {
    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: 20px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 34px rgba(6, 182, 212, 0.25);
}

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

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

.main-nav a:hover,
.main-nav a.active {
    color: white;
    background: rgba(6, 182, 212, 0.16);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 12px;
    color: white;
    background: rgba(15, 23, 42, 0.8);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 760px;
    display: grid;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.35) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.12) 48%, rgba(2, 6, 23, 0.75) 100%);
    z-index: 2;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 2.5s ease;
}

.hero-backdrop.active {
    opacity: 1;
    transform: scale(1);
}

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

.hero-inner {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 96px 0 76px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.72fr);
    gap: 40px;
    align-items: center;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(6, 182, 212, 0.32);
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(6, 182, 212, 0.1);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero h1 span,
.page-hero h1 span {
    color: #67e8f9;
}

.hero-text {
    margin: 24px 0 0;
    max-width: 680px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.85;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 16px 36px rgba(6, 182, 212, 0.26);
}

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

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

.hero-search {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    max-width: 620px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(16px);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 14px;
    outline: none;
    color: white;
    background: rgba(2, 6, 23, 0.72);
}

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

.hero-poster {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 26px;
    background: rgba(2, 6, 23, 0.92);
}

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

.hero-poster-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 88px 20px 20px;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.96));
}

.hero-poster-info strong {
    display: block;
    font-size: 22px;
    margin-bottom: 10px;
}

.hero-thumbs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.hero-thumb {
    position: relative;
    overflow: hidden;
    height: 68px;
    border: 1px solid transparent;
    border-radius: 15px;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.hero-thumb.active {
    border-color: var(--cyan);
}

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

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.hero-stats a,
.hero-stats span {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.6);
}

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

.content-section {
    padding: 62px 0 0;
}

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

.section-head h2,
.page-hero h1,
.detail-section h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-title p,
.card-body p,
.category-card span,
.rank-info p {
    color: var(--muted);
    line-height: 1.72;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    transition: 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.42);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(59, 130, 246, 0.12));
}

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

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

.poster-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: #020617;
    background: var(--yellow);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: block;
    min-height: 48px;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.45;
}

.card-body p {
    min-height: 74px;
    margin: 8px 0 12px;
    font-size: 14px;
}

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

.meta-row span,
.tags span {
    display: inline-flex;
    max-width: 100%;
    padding: 5px 8px;
    border: 1px solid rgba(6, 182, 212, 0.24);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(6, 182, 212, 0.08);
    font-size: 12px;
}

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

.category-card {
    position: relative;
    display: grid;
    min-height: 190px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.74);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
}

.category-card div {
    position: relative;
    z-index: 2;
    align-self: end;
    padding: 74px 16px 16px;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.category-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 74px 90px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
}

.rank-num {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    font-size: 20px;
    font-weight: 1000;
    color: #020617;
    background: linear-gradient(135deg, var(--yellow), #fb923c);
}

.rank-cover {
    width: 90px;
    height: 120px;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.8);
}

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

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.page-hero {
    padding: 68px 0 30px;
}

.page-hero p {
    max-width: 760px;
    margin-top: 14px;
    font-size: 18px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.64fr) minmax(0, 1fr);
    gap: 34px;
    align-items: start;
    padding: 52px 0 36px;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: var(--shadow);
    background: rgba(15, 23, 42, 0.72);
}

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

.detail-title h1 {
    font-size: clamp(34px, 5vw, 62px);
}

.detail-title p {
    margin: 18px 0 0;
    font-size: 18px;
}

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

.breadcrumbs a {
    color: #67e8f9;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.detail-meta div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.7);
}

.detail-meta span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

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

.player-wrap video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    z-index: 3;
}

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

.play-circle {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 50px rgba(6, 182, 212, 0.3);
    font-size: 34px;
}

.detail-section {
    margin-top: 34px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.66);
}

.detail-section p {
    color: var(--soft);
    line-height: 1.92;
    font-size: 17px;
}

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

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 96px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
}

.footer-inner strong {
    color: white;
}

.empty-state {
    display: none;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 24px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.68);
}

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

    .hero {
        min-height: auto;
    }

    .hero-panel {
        max-width: 560px;
    }

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

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

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

    .main-nav {
        position: fixed;
        top: 72px;
        left: 16px;
        right: 16px;
        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);
        box-shadow: var(--shadow);
    }

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

    .main-nav a {
        border-radius: 14px;
    }

    .hero-inner {
        padding: 54px 0 44px;
    }

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

    .hero-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .rank-item {
        grid-template-columns: 54px 74px 1fr;
    }

    .rank-item .btn {
        grid-column: 1 / -1;
    }

    .rank-cover {
        width: 74px;
        height: 98px;
    }

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

    .footer-inner {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .category-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
