:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.84);
    --bg-card-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #60a5fa;
    --violet: #818cf8;
    --green: #34d399;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.12), transparent 28rem),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}

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

.brand-text,
.footer-brand span:last-child {
    font-size: 21px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(96, 165, 250, 0.18));
    border: 1px solid rgba(34, 211, 238, 0.42);
    color: var(--cyan);
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.18);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    color: var(--muted-strong);
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

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

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 280px;
}

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

.top-search input:focus,
.page-filter input:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.top-search button {
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00111a;
    font-weight: 700;
    padding: 11px 14px;
}

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

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

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

.hero-stage {
    position: relative;
    min-height: 660px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    align-items: center;
    gap: 54px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-backdrop {
    position: fixed;
    inset: 0;
    z-index: -2;
    opacity: 0;
    transition: opacity 0.55s ease;
}

.hero-slide.active .hero-backdrop {
    opacity: 0.28;
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.98)),
        linear-gradient(0deg, var(--bg), transparent 55%);
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) saturate(1.18);
}

.hero-content {
    padding-top: 34px;
}

.eyebrow,
.section-heading span,
.page-hero span,
.detail-info .breadcrumb,
.overview-body span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0 20px;
    max-width: 760px;
    font-size: clamp(46px, 8vw, 92px);
    line-height: 0.96;
    letter-spacing: -0.08em;
}

.hero p {
    max-width: 700px;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.9;
}

.hero-tags,
.tag-row,
.detail-meta,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin: 24px 0;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    background: rgba(8, 47, 73, 0.38);
    color: #cffafe;
    padding: 6px 10px;
    font-size: 12px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 13px 20px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 45px rgba(34, 211, 238, 0.22);
}

.btn-ghost {
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.52);
}

.hero-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    max-height: 540px;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow), 0 0 70px rgba(34, 211, 238, 0.18);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 44%);
    z-index: 1;
}

.hero-poster img,
.movie-cover img,
.detail-poster img,
.category-covers img,
.overview-cover img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 99px;
    background: rgba(148, 163, 184, 0.34);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 56px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.quick-categories,
.section-grid-with-side,
.category-showcase,
.ranking-wrap,
.detail-layout,
.player-section,
.container > .section-heading {
    margin-top: 64px;
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading.centered {
    text-align: center;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.section-heading h2,
.page-hero h1,
.detail-article h2,
.side-card h2 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.045em;
}

.section-heading p,
.page-hero p {
    max-width: 720px;
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.centered p {
    margin-left: auto;
    margin-right: auto;
}

.compact-heading h2 {
    font-size: 28px;
}

.category-pill-row,
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.category-pill-row a,
.filter-pill {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--muted-strong);
    padding: 10px 16px;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.category-pill-row a:hover,
.filter-pill:hover,
.filter-pill.active {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.5);
    transform: translateY(-2px);
}

.section-grid-with-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 34px;
    align-items: start;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 20px 55px rgba(8, 47, 73, 0.28);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(96, 165, 250, 0.1)),
        #0f172a;
}

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), transparent 46%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .movie-cover::after {
    opacity: 1;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.92);
    color: #00111a;
    font-weight: 900;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-card-body {
    padding: 15px;
}

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

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.36;
}

.movie-card h3 a:hover {
    color: var(--cyan);
}

.movie-card p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    min-height: 64px;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.2);
}

.rank-panel,
.side-card,
.detail-article,
.player-box,
.overview-card,
.category-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.2);
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item a {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 8px 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.42);
    transition: background 0.2s ease;
}

.rank-item a:hover {
    background: rgba(8, 47, 73, 0.46);
}

.rank-num {
    grid-row: span 2;
    color: var(--cyan);
    font-weight: 900;
}

.rank-title {
    font-weight: 800;
}

.rank-meta {
    color: var(--muted);
    font-size: 12px;
}

.panel-link,
.text-link {
    display: inline-flex;
    margin-top: 18px;
    color: var(--cyan);
    font-weight: 800;
}

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

.category-card {
    display: block;
    padding: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.46);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    height: 120px;
    overflow: hidden;
    border-radius: 18px;
}

.category-covers img {
    min-width: 0;
    border-radius: 14px;
    background: #0f172a;
}

.category-card h3,
.overview-body h2 {
    margin: 16px 0 8px;
    font-size: 22px;
}

.category-card p,
.overview-body p {
    color: var(--muted);
    line-height: 1.7;
}

.page-hero {
    padding: 86px 0 54px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 14% 22%, rgba(34, 211, 238, 0.16), transparent 26rem),
        radial-gradient(circle at 82% 16%, rgba(129, 140, 248, 0.14), transparent 26rem),
        rgba(15, 23, 42, 0.32);
}

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

.page-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 36px;
    align-items: end;
}

.page-filter {
    align-self: end;
}

.filter-pills {
    margin-top: 28px;
    justify-content: flex-start;
}

.overview-grid {
    margin-top: 44px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    overflow: hidden;
    padding: 18px;
}

.overview-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    min-height: 210px;
}

.overview-cover img {
    border-radius: 14px;
    background: #0f172a;
}

.overview-sample {
    color: var(--muted-strong) !important;
}

.rank-section {
    margin-bottom: 58px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0 70px;
    border-bottom: 1px solid var(--line);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.24;
    z-index: -2;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74)),
        linear-gradient(0deg, var(--bg), transparent 62%);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(5px) saturate(1.16);
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: var(--radius-xl);
    background: #0f172a;
    box-shadow: var(--shadow);
}

.breadcrumb {
    flex-wrap: wrap;
    margin-bottom: 16px;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

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

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1;
    letter-spacing: -0.07em;
}

.detail-one-line {
    max-width: 820px;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta {
    margin: 22px 0;
}

.detail-tags {
    margin-bottom: 28px;
}

.player-section {
    scroll-margin-top: 90px;
}

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

.movie-player,
.player-cover {
    width: 100%;
    height: 100%;
}

.movie-player {
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
    color: var(--text);
    z-index: 2;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.16));
}

.player-cover.is-hidden {
    display: none;
}

.player-button {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00111a;
    font-size: 34px;
    font-weight: 900;
    box-shadow: 0 18px 60px rgba(34, 211, 238, 0.32);
}

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

.detail-article {
    padding: 32px;
}

.detail-article h2 {
    font-size: 30px;
    margin: 0 0 18px;
}

.detail-article h2:not(:first-child) {
    margin-top: 34px;
}

.detail-article p {
    color: var(--muted-strong);
    line-height: 2;
    margin: 0 0 16px;
}

.detail-side {
    position: sticky;
    top: 92px;
}

.side-card {
    padding: 24px;
}

.side-card h2 {
    font-size: 24px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    margin: 22px 0 0;
}

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

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

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

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr 1fr;
    gap: 40px;
}

.footer-about p,
.footer-bottom,
.footer-links a {
    color: var(--muted);
}

.footer-about p {
    max-width: 560px;
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
}

.footer-links {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 38px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}

.js-card.is-hidden {
    display: none;
}

@media (max-width: 1100px) {
    .wide-grid,
    .compact-grid,
    .movie-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .section-grid-with-side,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .rank-panel,
    .detail-side {
        position: static;
    }
}

@media (max-width: 900px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 12px 0;
    }

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

    .site-nav {
        display: none;
        order: 4;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 0;
    }

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

    .nav-link {
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(15, 23, 42, 0.68);
    }

    .top-search {
        order: 3;
        flex: 1 1 100%;
    }

    .hero,
    .hero-stage {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 38px 0 78px;
    }

    .hero-poster {
        max-width: 320px;
        max-height: none;
    }

    .page-hero-inner,
    .detail-hero-inner,
    .footer-grid,
    .overview-card {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .hero h1,
    .detail-info h1 {
        letter-spacing: -0.05em;
    }

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

    .movie-card-body {
        padding: 12px;
    }

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

    .detail-article,
    .side-card {
        padding: 22px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
