:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #3b82f6;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 0%, rgba(6, 182, 212, 0.16), transparent 28rem),
        radial-gradient(circle at 82% 12%, rgba(59, 130, 246, 0.14), transparent 32rem),
        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;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 80;
    background: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    font-size: 20px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.14);
    color: var(--cyan);
    border: 1px solid rgba(34, 211, 238, 0.42);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.22);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #cbd5e1;
    font-size: 15px;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
    color: var(--cyan);
}

.menu-toggle {
    display: none;
    color: #cbd5e1;
    background: transparent;
    border: 0;
    font-size: 25px;
    cursor: pointer;
}

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

.mobile-panel.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-panel a {
    padding: 10px 12px;
    color: #cbd5e1;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.55);
}

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

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease, transform 1s ease;
    transform: scale(1.02);
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.2) 0%, rgba(2, 6, 23, 0.58) 45%, #020617 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.55) 48%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 82px;
    width: min(720px, calc(100% - 64px));
}

.hero-tags,
.tag-row,
.detail-tags,
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.tag-row span,
.detail-tags a,
.category-pill {
    padding: 5px 10px;
    border: 1px solid rgba(34, 211, 238, 0.38);
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.13);
    color: #a5f3fc;
    font-size: 13px;
}

.hero-content h1 {
    margin: 18px 0 16px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.06em;
    text-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
}

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

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-primary,
.btn-ghost,
.global-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary,
.global-search button {
    border: 1px solid rgba(34, 211, 238, 0.5);
    color: white;
    background: linear-gradient(90deg, var(--cyan-strong), #2563eb);
    box-shadow: 0 16px 35px rgba(6, 182, 212, 0.24);
}

.btn-ghost {
    border: 1px solid rgba(148, 163, 184, 0.32);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(12px);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.42);
    cursor: pointer;
}

.hero-dot.active {
    width: 26px;
    background: var(--cyan);
}

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

.search-band {
    position: relative;
    margin-top: -42px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    z-index: 10;
}

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

.section-head.compact {
    align-items: start;
    margin-bottom: 18px;
}

.section-head h2,
.category-card h2,
.ranking-info h2,
.detail-article h2,
.side-card h2 {
    margin: 0;
    color: white;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.2;
}

.section-head p,
.category-card p,
.detail-line,
.movie-meta,
.movie-desc,
.ranking-info p,
.detail-intro,
.detail-article p,
.side-card,
.site-footer p {
    color: var(--muted);
}

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

.global-search,
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.global-search input,
.local-filter,
.type-filter {
    min-height: 46px;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.72);
    outline: none;
}

.global-search input,
.local-filter {
    flex: 1;
    padding: 0 16px;
}

.type-filter {
    padding: 0 14px;
}

.global-search input:focus,
.local-filter:focus,
.type-filter:focus {
    border-color: rgba(34, 211, 238, 0.58);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

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

.no-top {
    padding-top: 36px;
}

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

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

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

.movie-card,
.category-card,
.ranking-card,
.side-card,
.detail-article {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.2);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.34);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.32);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img,
.category-cover img,
.ranking-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.category-card:hover .category-cover img,
.ranking-card:hover .ranking-cover img {
    transform: scale(1.06);
}

.poster-badge,
.ranking-number {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    color: #082f49;
    background: var(--cyan);
    font-weight: 800;
    font-size: 12px;
}

.poster-play {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    color: white;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.category-samples a:hover,
.ranking-info a:hover,
.next-links a:hover {
    color: var(--cyan);
}

.movie-meta,
.movie-desc {
    margin: 0 0 10px;
    font-size: 13px;
}

.movie-desc {
    min-height: 42px;
}

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

.ranking-panel {
    position: sticky;
    top: 86px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(14px);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 32px 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.42);
}

.rank-row:hover {
    background: rgba(6, 182, 212, 0.11);
}

.rank-index,
.rank-score {
    color: var(--cyan);
    font-weight: 800;
}

.rank-row img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

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

.muted-section {
    width: 100%;
    max-width: none;
    margin-top: 74px;
    padding: 72px max(16px, calc((100vw - 1180px) / 2));
    background: rgba(15, 23, 42, 0.28);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.page-shell,
.detail-shell {
    padding-top: 104px;
}

.page-hero {
    min-height: 260px;
    display: flex;
    align-items: end;
    padding: 44px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(37, 99, 235, 0.08)),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 10px 0 12px;
    font-size: clamp(34px, 6vw, 56px);
    line-height: 1.06;
}

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

.eyebrow {
    margin: 0;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.category-grid-section {
    padding: 36px 0 0;
}

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

.category-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    overflow: hidden;
}

.category-cover {
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    overflow: hidden;
    background: #0f172a;
}

.category-card p {
    margin: 9px 0 13px;
}

.category-samples {
    display: grid;
    gap: 5px;
    color: #cbd5e1;
    font-size: 14px;
}

.ranking-grid {
    display: grid;
    gap: 18px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 22px;
    padding: 16px;
}

.ranking-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

.ranking-info p {
    margin: 10px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: #cbd5e1;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
    gap: 28px;
    align-items: stretch;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: black;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
}

.player-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #020617;
    cursor: pointer;
    z-index: 4;
}

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

.player-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.player-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.74));
}

.play-large {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 5;
    transform: translate(-50%, -50%);
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
    box-shadow: 0 18px 50px rgba(6, 182, 212, 0.34);
    font-size: 34px;
}

.detail-info {
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-info h1 {
    margin: 10px 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
}

.detail-line,
.detail-intro {
    margin: 0 0 16px;
}

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

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    margin-top: 34px;
}

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

.detail-article h2 {
    margin: 0 0 14px;
}

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

.detail-article p {
    margin: 0;
    font-size: 17px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 18px 0 24px;
}

.side-card dt {
    color: #cbd5e1;
    font-weight: 800;
}

.side-card dd {
    margin: 0;
}

.next-links {
    display: grid;
    gap: 10px;
}

.next-links a {
    padding: 11px 12px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.42);
    color: #e2e8f0;
}

.related-section {
    padding-bottom: 72px;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    max-width: 560px;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 15px;
    color: #cbd5e1;
}

.is-filtered-out {
    display: none !important;
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: 72vh;
    }

    .hero-content {
        left: 24px;
        bottom: 72px;
        width: calc(100% - 48px);
    }

    .hero-control {
        display: none;
    }

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

    .ranking-panel {
        position: static;
    }

    .footer-inner {
        display: grid;
    }
}

@media (max-width: 760px) {
    .search-band,
    .page-hero,
    .detail-info,
    .detail-article,
    .side-card {
        padding: 20px;
        border-radius: 22px;
    }

    .global-search,
    .filter-bar {
        flex-direction: column;
    }

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

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

    .category-card,
    .ranking-card {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .ranking-cover {
        border-radius: 14px;
    }

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

    .movie-desc {
        display: none;
    }

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

    .hero-actions,
    .detail-actions {
        align-items: stretch;
    }

    .btn-primary,
    .btn-ghost {
        flex: 1;
    }
}

@media (max-width: 520px) {
    .mobile-panel.is-open {
        grid-template-columns: 1fr;
    }

    .hero-carousel {
        min-height: 74vh;
    }

    .hero-content {
        bottom: 58px;
    }

    .hero-tags span,
    .tag-row span,
    .detail-tags a,
    .category-pill {
        font-size: 12px;
    }

    .movie-grid,
    .compact-grid,
    .all-movies-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .category-cover,
    .ranking-cover {
        max-height: 240px;
    }

    .rank-row {
        grid-template-columns: 28px 46px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }
}
