:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --bg-card-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --cyan-dark: #0891b2;
    --orange: #f59e0b;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 28rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 32rem),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

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

.nav-shell {
    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: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #001018;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), #67e8f9 45%, #a5f3fc);
    box-shadow: 0 0 26px rgba(34, 211, 238, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

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

.brand-text small {
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--soft);
    font-weight: 600;
}

.desktop-nav a {
    position: relative;
    transition: color 0.2s ease;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--cyan);
    transition: transform 0.2s ease;
}

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

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    transform: scaleX(1);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
    padding: 10px;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 10px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.95);
}

.mobile-nav a {
    display: block;
    padding: 13px 14px;
    color: var(--soft);
    border-radius: 12px;
}

.mobile-nav a:hover {
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.08);
}

.mobile-nav.is-open {
    display: block;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.10) 45%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 70vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: end;
    gap: 52px;
    padding: 94px 0 72px;
}

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

.hero-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-kicker span,
.movie-badge,
.movie-year,
.rank-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--soft);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-kicker span:first-child {
    background: rgba(6, 182, 212, 0.90);
    color: white;
    border-color: rgba(103, 232, 249, 0.35);
}

.hero-kicker span {
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 22px 0 0;
    max-width: 650px;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 20px);
}

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

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    box-shadow: 0 16px 40px rgba(34, 211, 238, 0.28);
}

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

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.ghost-button:hover {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.10);
}

.hero-cover-card {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.52);
    box-shadow: var(--shadow);
    transform: rotate(1.5deg);
}

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

.hero-cover-card span {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    display: inline-flex;
    justify-content: center;
    border-radius: 14px;
    padding: 10px 12px;
    font-weight: 800;
    color: white;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(14px);
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

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

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

.intro-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: -18px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.55));
    box-shadow: var(--shadow);
}

.intro-strip h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.content-card h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.intro-strip h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.intro-strip p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

.section-heading p {
    margin: 0 0 4px;
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 12px;
}

.section-heading h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.section-heading a {
    color: var(--cyan);
    font-weight: 800;
}

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

.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
}

.small-grid {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

.movie-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
    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.36);
    box-shadow: 0 26px 62px rgba(0, 0, 0, 0.28);
}

.movie-poster {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.32s ease, filter 0.32s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.06);
    filter: saturate(1.08) brightness(1.05);
}

.movie-badge,
.movie-year {
    position: absolute;
    top: 12px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(12px);
}

.movie-badge {
    left: 12px;
    color: white;
}

.movie-year {
    right: 12px;
    color: var(--cyan);
}

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

.movie-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card p {
    min-height: 48px;
    margin: 10px 0 12px;
    color: var(--muted);
    font-size: 14px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    gap: 8px;
    color: #cbd5e1;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
}

.movie-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

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

.tag-row span {
    padding: 4px 8px;
    color: #bae6fd;
    font-size: 12px;
    background: rgba(8, 145, 178, 0.12);
    border-color: rgba(34, 211, 238, 0.20);
}

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

.category-card,
.category-overview-block,
.content-card,
.filter-panel,
.ranking-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.category-card {
    display: block;
    padding: 24px;
    min-height: 150px;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.36);
    background: rgba(8, 47, 73, 0.55);
}

.category-card span {
    display: block;
    font-size: 22px;
    font-weight: 900;
}

.category-card p,
.category-desc {
    color: var(--muted);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

.ranking-panel {
    padding: 22px;
    position: sticky;
    top: 96px;
}

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

.rank-item {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 48px 84px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.mini-rank .rank-item a {
    grid-template-columns: 38px 58px minmax(0, 1fr);
    gap: 10px;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-weight: 900;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
}

.rank-item img {
    width: 84px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.mini-rank .rank-item img {
    width: 58px;
}

.rank-item h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
}

.rank-item p {
    margin: 5px 0 8px;
    color: var(--muted);
    font-size: 14px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.rank-meta span {
    padding: 3px 8px;
    font-size: 12px;
}

.page-main {
    padding-bottom: 36px;
}

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

.page-hero h1 {
    margin-top: 18px;
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #bae6fd;
}

.filter-panel {
    padding: 18px;
    margin-bottom: 24px;
}

.search-field {
    display: flex;
    gap: 12px;
}

.search-field input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    outline: none;
    padding: 14px 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.58);
}

.search-field input:focus {
    border-color: rgba(34, 211, 238, 0.58);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.search-field button,
.quick-filters button {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.88);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.search-field button {
    white-space: nowrap;
    padding: 0 18px;
}

.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.quick-filters button {
    padding: 8px 12px;
}

.quick-filters button:hover,
.quick-filters button.is-active,
.search-field button:hover {
    color: #001018;
    border-color: transparent;
    background: var(--cyan);
}

.category-index-grid {
    display: grid;
    gap: 28px;
}

.category-overview-block {
    padding: 24px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    background: #020617;
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(18px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.38;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.76) 48%, rgba(2, 6, 23, 0.44) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.30) 100%);
}

.detail-inner {
    position: relative;
    z-index: 2;
    padding: 54px 0 64px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
    margin-top: 36px;
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: var(--shadow);
}

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

.detail-copy h1 {
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.05;
}

.detail-copy p {
    max-width: 780px;
    color: #dbeafe;
    font-size: 19px;
}

.detail-tags {
    margin: 24px 0 30px;
}

.player-section {
    padding-top: 0;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: black;
    box-shadow: var(--shadow);
}

.player-frame video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.16));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #001018;
    font-size: 34px;
    line-height: 1;
    padding-left: 6px;
    background: linear-gradient(135deg, var(--cyan), #a5f3fc);
    box-shadow: 0 22px 60px rgba(34, 211, 238, 0.30);
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-card {
    padding: 26px;
}

.content-card h2 {
    font-size: 28px;
}

.content-card p {
    margin-bottom: 0;
    color: #cbd5e1;
    font-size: 17px;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 36px 0;
    color: var(--muted);
}

.footer-inner strong {
    color: var(--text);
    font-size: 20px;
}

.footer-inner p {
    margin: 8px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: flex-end;
    max-width: 620px;
}

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

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

.empty-result {
    grid-column: 1 / -1;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.72);
}

@media (max-width: 960px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
        align-items: end;
        padding-top: 86px;
    }

    .hero-cover-card {
        display: none;
    }

    .split-section,
    .detail-content,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }

    .detail-poster {
        width: min(300px, 80vw);
    }
}

@media (max-width: 640px) {
    .nav-shell,
    .section-shell,
    .page-hero,
    .detail-inner,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

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

    .brand-text small {
        display: none;
    }

    .hero,
    .hero-content {
        min-height: 74vh;
    }

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

    .intro-strip,
    .section-heading,
    .footer-inner,
    .search-field {
        flex-direction: column;
        align-items: stretch;
    }

    .section-heading {
        gap: 8px;
    }

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

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

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

    .movie-card p,
    .movie-meta,
    .tag-row {
        font-size: 12px;
    }

    .rank-item a {
        grid-template-columns: 42px 64px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-item img {
        width: 64px;
    }

    .rank-item .tag-row {
        display: none;
    }

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

    .detail-inner {
        padding-bottom: 44px;
    }

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