:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --panel-line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #2563eb;
    --yellow: #facc15;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
    --radius: 22px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    background:
        radial-gradient(circle at 18% 0%, rgba(8, 145, 178, 0.18), transparent 34rem),
        radial-gradient(circle at 90% 14%, rgba(37, 99, 235, 0.16), transparent 32rem),
        var(--bg);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

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

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00111a;
    font-size: 17px;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.22);
}

.brand-text {
    display: grid;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text em {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #dbeafe;
    font-size: 15px;
}

.desktop-nav a,
.nav-dropdown > button {
    padding: 22px 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-dropdown:hover > button {
    color: var(--cyan);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 62px;
    left: 0;
    width: 190px;
    padding: 10px;
    display: grid;
    gap: 2px;
    border: 1px solid var(--panel-line);
    border-radius: 16px;
    background: #0f172a;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.dropdown-panel a {
    padding: 10px 12px;
    border-radius: 10px;
}

.dropdown-panel a:hover {
    background: rgba(34, 211, 238, 0.12);
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-form,
.mobile-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form input,
.mobile-search input,
.inline-filter input {
    width: 260px;
    border: 1px solid var(--panel-line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: var(--text);
    outline: none;
    padding: 11px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.mobile-search input:focus,
.inline-filter input:focus {
    border-color: rgba(34, 211, 238, 0.78);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.search-form button,
.mobile-search button,
.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form button,
.mobile-search button,
.primary-button {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #02131b;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(8, 145, 178, 0.26);
}

.search-form button:hover,
.mobile-search button:hover,
.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.58);
    color: var(--text);
}

.menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--panel-line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: var(--text);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid var(--panel-line);
}

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

.mobile-nav a {
    padding: 11px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.62);
}

.mobile-search {
    margin: 14px 0 4px;
}

.mobile-search input {
    width: 100%;
}

.hero {
    position: relative;
    height: min(74vh, 650px);
    min-height: 520px;
    overflow: hidden;
    background: #050b18;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

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

.hero-vignette {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.64) 45%, rgba(2, 6, 23, 0.2)),
        linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.08) 40%);
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
}

.eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 790px;
    margin: 0 0 22px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 30px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

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

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

.hero-dots button {
    width: 36px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: var(--cyan);
}

.section-shell,
.breadcrumb,
.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.section-shell {
    padding: 52px 0;
}

.intro-panel,
.feature-band,
.ranking-panel,
.filter-panel {
    margin-top: 40px;
    padding: 32px;
    border: 1px solid var(--panel-line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.13), rgba(30, 41, 59, 0.82));
    box-shadow: var(--shadow);
}

.intro-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.intro-panel h2,
.section-title h2,
.side-rank h2,
.detail-content h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.intro-panel p,
.page-hero p,
.detail-content p {
    color: #cbd5e1;
    line-height: 1.85;
}

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

.section-title a {
    color: var(--cyan);
    font-weight: 700;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

.four-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--panel-line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 16px 36px 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(-5px);
    border-color: rgba(34, 211, 238, 0.46);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.32);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.82);
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

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

.movie-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(2, 6, 23, 0.76);
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

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

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta span,
.detail-meta span {
    border: 1px solid var(--panel-line);
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(15, 23, 42, 0.62);
}

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

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

.movie-card p {
    min-height: 4.8em;
    margin: 0 0 15px;
    color: #cbd5e1;
    line-height: 1.6;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 42% 1fr;
}

.movie-card-wide .movie-poster {
    height: 100%;
    min-height: 235px;
}

.compact-grid .movie-card-wide .movie-poster {
    min-height: 170px;
}

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

.tag-row span {
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(34, 211, 238, 0.1);
    color: #a5f3fc;
    font-size: 12px;
}

.large-tags span {
    font-size: 13px;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid var(--panel-line);
    border-radius: 20px;
    padding: 18px;
    background: #0f172a;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.46;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.18));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 1;
}

.category-card span {
    font-size: 21px;
    font-weight: 900;
}

.category-card p {
    margin: 8px 0 0;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.6;
}

.category-card:hover img {
    transform: scale(1.07);
    opacity: 0.6;
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto 64px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--panel-line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(3px);
    border-color: rgba(34, 211, 238, 0.45);
}

.rank-number {
    color: var(--yellow);
    font-size: 22px;
    font-weight: 950;
}

.rank-item img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(30, 41, 59, 0.9);
}

.rank-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.rank-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy em {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin: 34px auto 0;
    border: 1px solid var(--panel-line);
    border-radius: 28px;
    background:
        radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.22), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.76));
    box-shadow: var(--shadow);
}

.small-hero {
    width: min(1180px, calc(100% - 32px));
    padding: 56px;
}

.small-hero h1 {
    margin: 0 0 15px;
    font-size: clamp(36px, 5vw, 62px);
    letter-spacing: -0.04em;
}

.small-hero p {
    max-width: 760px;
    margin: 0;
    font-size: 18px;
}

.inline-filter {
    display: flex;
    align-items: center;
    gap: 18px;
}

.inline-filter input {
    width: min(520px, 100%);
}

.inline-filter span {
    display: none;
    color: var(--yellow);
}

.inline-filter span.is-visible {
    display: inline;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: start;
    gap: 28px;
}

.side-rank {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--panel-line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
}

.side-rank h2 {
    margin-bottom: 6px;
    font-size: 24px;
}

.side-rank .rank-item {
    grid-template-columns: auto 1fr;
}

.side-rank .rank-item img {
    display: none;
}

.breadcrumb {
    padding: 28px 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: center;
    padding: 34px 0 24px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 28px;
    background: #050b18;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.18));
    color: #fff;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00111a;
    font-size: 34px;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(8, 145, 178, 0.42);
}

.player-overlay strong {
    max-width: 80%;
    font-size: clamp(22px, 4vw, 42px);
    text-align: center;
    text-shadow: 0 8px 26px rgba(0, 0, 0, 0.65);
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.detail-one-line {
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

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

.detail-copy .primary-button {
    margin-top: 24px;
}

.detail-content {
    padding-top: 32px;
}

.detail-content article {
    max-width: 900px;
    padding: 34px;
    border: 1px solid var(--panel-line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
}

.detail-content h2 {
    margin-top: 0;
    margin-bottom: 16px;
}

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

.site-footer {
    margin-top: 60px;
    border-top: 1px solid var(--panel-line);
    background: rgba(15, 23, 42, 0.8);
}

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 32px;
}

.footer-brand {
    margin-bottom: 12px;
    color: var(--cyan);
    font-size: 22px;
    font-weight: 900;
}

.footer-shell p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: start;
}

.footer-links a {
    border: 1px solid var(--panel-line);
    border-radius: 999px;
    padding: 8px 12px;
    color: #dbeafe;
}

.footer-links a:hover {
    border-color: rgba(34, 211, 238, 0.45);
    color: var(--cyan);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--muted);
    font-size: 13px;
}

[data-card-list] .movie-card.is-hidden {
    display: none;
}

@media (max-width: 1080px) {
    .desktop-nav,
    .search-form {
        display: none;
    }

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .three-cols,
    .four-cols,
    .rank-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split-layout,
    .detail-hero,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .side-rank {
        position: static;
    }
}

@media (max-width: 720px) {
    .nav-shell {
        width: min(100% - 24px, 1180px);
        height: 64px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text em {
        display: none;
    }

    .hero {
        min-height: 560px;
        height: 72vh;
    }

    .hero-content {
        width: min(100% - 28px, 1180px);
        justify-content: flex-end;
        padding-bottom: 84px;
    }

    .hero-vignette {
        background:
            linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.35) 70%),
            linear-gradient(90deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.2));
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .intro-panel,
    .section-title,
    .inline-filter {
        display: grid;
        align-items: start;
    }

    .section-shell,
    .breadcrumb,
    .detail-hero {
        width: min(100% - 24px, 1180px);
    }

    .small-hero {
        width: min(100% - 24px, 1180px);
        padding: 34px 22px;
    }

    .two-cols,
    .three-cols,
    .four-cols,
    .rank-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-wide {
        grid-template-columns: 1fr;
    }

    .movie-card-wide .movie-poster {
        min-height: 0;
    }

    .detail-content article {
        padding: 24px;
    }

    .player-overlay span {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}
