:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.22);
    --cyan: #22d3ee;
    --blue: #2563eb;
    --violet: #7c3aed;
    --amber: #fbbf24;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.18), transparent 32rem),
        radial-gradient(circle at 90% 8%, rgba(37, 99, 235, 0.18), transparent 36rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

main {
    overflow: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

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

.brand-text {
    font-size: 22px;
}

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

.nav-link {
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--cyan);
}

.header-search {
    min-width: 220px;
}

.header-search input,
.search-control,
.filter-select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
    color: var(--text);
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.search-control:focus,
.filter-select:focus {
    border-color: rgba(34, 211, 238, 0.82);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.88);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 10px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 14px 22px 18px;
    background: rgba(2, 6, 23, 0.96);
}

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

.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 22px;
}

.section--tight {
    padding-top: 38px;
}

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

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

.section-heading p,
.page-title p {
    margin: 12px 0 0;
    color: var(--muted);
    max-width: 780px;
}

.link-more,
.btn,
.hero-link,
.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.link-more {
    color: var(--cyan);
    white-space: nowrap;
}

.btn,
.hero-link,
.play-button {
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.26);
}

.btn--ghost,
.hero-link--ghost {
    background: rgba(15, 23, 42, 0.62);
    color: var(--text);
    box-shadow: none;
}

.btn:hover,
.hero-link:hover,
.play-button:hover,
.movie-card:hover,
.category-tile:hover {
    transform: translateY(-4px);
}

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

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 25%, rgba(34, 211, 238, 0.26), transparent 24rem),
        radial-gradient(circle at 18% 20%, rgba(124, 58, 237, 0.2), transparent 24rem);
    pointer-events: none;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 46%, rgba(2, 6, 23, 0.28) 100%),
        var(--hero-image);
    background-position: center;
    background-size: cover;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 110px 22px 92px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.62fr);
    gap: 48px;
    align-items: center;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(44px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(24px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
}

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

.hero-panel {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.7);
    border-radius: 30px;
    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 h3 {
    margin: 16px 0 4px;
    font-size: 22px;
}

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

.hero-dot {
    width: 38px;
    height: 7px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.stats-strip {
    position: relative;
    z-index: 4;
    max-width: 1180px;
    margin: -54px auto 0;
    padding: 0 22px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    padding: 20px;
    backdrop-filter: blur(16px);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.28);
}

.stat-card strong {
    display: block;
    font-size: 28px;
    line-height: 1;
}

.stat-card span {
    color: var(--muted);
    font-size: 14px;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(34, 211, 238, 0.46);
    box-shadow: 0 26px 58px rgba(34, 211, 238, 0.13);
}

.movie-card__poster {
    position: relative;
    margin: 0;
    background: #111827;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.movie-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

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

.movie-card__year,
.movie-card__score {
    position: absolute;
    z-index: 3;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    color: white;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.movie-card__year {
    top: 12px;
    left: 12px;
}

.movie-card__score {
    right: 12px;
    bottom: 12px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.9), rgba(37, 99, 235, 0.9));
}

.movie-card__body {
    padding: 17px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.movie-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    font-size: 13px;
}

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

.tag {
    display: inline-flex;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    padding: 4px 9px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.1);
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    position: relative;
    min-height: 178px;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(37, 99, 235, 0.08)),
        rgba(15, 23, 42, 0.82);
    padding: 22px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
    border-color: rgba(34, 211, 238, 0.52);
}

.category-tile h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.category-tile span {
    position: absolute;
    right: 18px;
    bottom: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 900;
}

.page-hero {
    padding: 74px 22px 34px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(37, 99, 235, 0.1)),
        rgba(2, 6, 23, 0.2);
}

.page-title {
    max-width: 1280px;
    margin: 0 auto;
}

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

.breadcrumb a {
    color: var(--cyan);
}

.controls-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px 180px;
    gap: 12px;
    margin-bottom: 28px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 160px 120px;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.74);
    padding: 14px 16px;
}

.rank-number {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
}

.ranking-item h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

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

.detail-hero {
    position: relative;
    min-height: 620px;
    display: grid;
    align-items: end;
    background-image:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.34)),
        var(--detail-image);
    background-size: cover;
    background-position: center;
}

.detail-hero__inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 96px 22px 56px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow);
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.detail-copy p {
    margin: 0;
    max-width: 820px;
    color: #dbeafe;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.detail-meta span {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.58);
    color: #e0f2fe;
    font-weight: 800;
}

.player-wrap {
    border-radius: 28px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow);
}

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

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

.big-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.9), rgba(37, 99, 235, 0.9));
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.38);
    font-size: 36px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.big-play:hover {
    transform: scale(1.06);
}

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

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

.content-panel,
.side-panel {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    padding: 26px;
}

.content-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-panel p {
    margin: 0 0 18px;
    color: #cbd5e1;
    font-size: 16px;
}

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

.side-list a {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.side-list strong {
    color: var(--text);
}

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

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 22px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
}

.footer-inner p {
    color: var(--muted);
    max-width: 520px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: flex-end;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: var(--cyan);
}

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.back-top:hover {
    transform: translateY(-3px);
}

.no-results {
    display: none;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    padding: 28px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.72);
}

.no-results.is-visible {
    display: block;
}

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

    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }
}

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

    .hero {
        min-height: 760px;
    }

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

    .stats-strip {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .ranking-item {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .ranking-item > span:last-child,
    .ranking-item > a:last-child {
        grid-column: 2;
    }
}

@media (max-width: 640px) {
    .header-inner {
        padding: 12px 16px;
    }

    .section {
        padding: 50px 16px;
    }

    .page-hero {
        padding: 54px 16px 26px;
    }

    .hero-content {
        padding: 82px 16px 86px;
    }

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

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

    .movie-card__body {
        padding: 13px;
    }

    .movie-card h3 {
        font-size: 16px;
    }

    .movie-card p {
        font-size: 13px;
    }

    .stats-strip {
        grid-template-columns: 1fr;
        margin-top: -34px;
    }

    .detail-hero {
        min-height: auto;
    }

    .detail-hero__inner {
        padding-top: 72px;
    }

    .detail-poster {
        max-width: 210px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}
