:root {
    color-scheme: dark;
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.86);
    --panel-soft: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --blue: #60a5fa;
    --shadow: 0 24px 80px rgba(8, 47, 73, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-main);
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at 84% 12%, rgba(37, 99, 235, 0.18), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.86), transparent 78%);
}

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

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

button,
input {
    font: inherit;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    width: min(1240px, calc(100% - 28px));
    min-height: 72px;
    margin-inline: auto;
}

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

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

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #cbd5e1;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.14);
}

.header-search {
    position: relative;
    width: min(300px, 30vw);
    margin-left: auto;
}

.header-search input,
.home-search-box input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.9);
}

.header-search input {
    padding: 11px 18px;
}

.home-search-box input {
    padding: 14px 20px;
}

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

.search-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    z-index: 90;
    width: min(460px, 92vw);
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
}

.hero-search-card .search-panel {
    right: auto;
    left: 0;
}

.search-panel ul {
    margin: 0;
    padding: 10px;
    list-style: none;
}

.search-panel a {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
}

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

.search-panel img {
    width: 56px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.95);
}

.search-panel strong,
.search-panel em {
    display: block;
}

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

.empty-result {
    padding: 18px;
    color: var(--text-muted);
}

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

.menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.hero-carousel {
    position: relative;
    min-height: 760px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    filter: blur(4px) saturate(1.08);
    transform: scale(1.02);
}

.hero-overlay,
.detail-bg-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.36) 100%),
        linear-gradient(180deg, transparent 0%, #020617 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    padding-top: 76px;
    margin-inline: auto;
}

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

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    max-width: 820px;
    font-size: clamp(42px, 8vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.08em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

.hero-actions,
.hero-quick-links,
.tag-row,
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-actions {
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.wide-link,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    padding: 14px 24px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.24);
}

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

.ghost-button {
    padding: 13px 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.72);
}

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 34px;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.14);
    font-size: 12px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

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

.hero-search-card {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px) 1.4fr;
    gap: 18px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
}

.hero-search-card p {
    margin: 0;
    color: #e2e8f0;
    font-weight: 800;
}

.hero-quick-links a {
    padding: 9px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
}

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

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

.section-heading h2,
.panel-heading h2,
.detail-article h2,
.detail-info-card h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.05em;
}

.section-more,
.text-link {
    color: var(--cyan);
    font-weight: 800;
}

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

.category-card,
.category-overview-card,
.rank-panel,
.detail-article,
.detail-info-card,
.player-card,
.movie-card,
.rank-row {
    border: 1px solid var(--line);
    background: var(--panel-bg);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
}

.category-card {
    min-height: 158px;
    padding: 22px;
    border-radius: 26px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-row:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.38);
}

.category-card span {
    display: block;
    margin-bottom: 18px;
    color: var(--cyan);
    font-weight: 900;
}

.category-card strong {
    color: #dbeafe;
    font-size: 15px;
    line-height: 1.7;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.88) 100%);
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    color: #00111a;
    background: var(--cyan);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    color: #00111a;
    background: linear-gradient(135deg, #fef08a, #22d3ee);
    font-weight: 900;
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--text-muted);
    font-size: 12px;
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: #f8fafc;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card p {
    min-height: 62px;
    margin: 0 0 14px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.6;
}

.movie-card.compact p {
    min-height: 42px;
}

.filter-bar {
    margin: -4px 0 24px;
}

.filter-chip {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.75);
}

.filter-chip.active,
.filter-chip:hover {
    color: #00111a;
    border-color: transparent;
    background: var(--cyan);
}

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

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    border-radius: 28px;
}

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

.rank-list a {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
}

.rank-list a:hover {
    background: rgba(34, 211, 238, 0.1);
}

.rank-list span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 10px;
    color: #00111a;
    background: var(--cyan);
    font-weight: 900;
}

.rank-list strong,
.rank-list em {
    display: block;
}

.rank-list em {
    color: var(--text-muted);
    font-size: 12px;
    font-style: normal;
}

.wide-link {
    width: 100%;
    margin-top: 18px;
    padding: 13px 18px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.page-hero {
    padding: 82px 0 34px;
}

.page-hero h1 {
    max-width: 920px;
}

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

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 28px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-thumb-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-thumb-stack img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: #0f172a;
}

.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.category-overview-card p {
    margin: 0 0 16px;
    color: #94a3b8;
    line-height: 1.75;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 86px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-number {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    color: #00111a;
    background: linear-gradient(135deg, #fef08a, var(--cyan));
    font-size: 20px;
    font-weight: 900;
}

.rank-cover img {
    width: 86px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: #0f172a;
}

.rank-main h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.rank-main p {
    margin: 0 0 10px;
    color: #94a3b8;
    line-height: 1.7;
}

.detail-hero {
    position: relative;
    overflow: hidden;
}

.detail-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    min-height: 620px;
    padding: 84px 0 60px;
}

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

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

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

.player-card {
    padding: 16px;
    border-radius: 32px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
}

.player-shell video {
    width: 100%;
    max-height: 72vh;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.78));
}

.play-layer.is-hidden {
    display: none;
}

.play-symbol {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 50%;
    color: #00111a;
    background: var(--cyan);
    font-size: 34px;
    box-shadow: 0 16px 50px rgba(34, 211, 238, 0.28);
}

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

.detail-article,
.detail-info-card {
    padding: 28px;
    border-radius: 28px;
}

.detail-article p:not(.eyebrow) {
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.95;
}

.review-eyebrow {
    margin-top: 30px;
}

.detail-info-card dl {
    display: grid;
    gap: 12px;
    margin: 20px 0 0;
}

.detail-info-card div {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.detail-info-card dt {
    color: var(--text-muted);
}

.detail-info-card dd {
    margin: 0;
}

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

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
    width: min(1180px, calc(100% - 32px));
    padding: 34px 0;
    margin-inline: auto;
}

.footer-inner p {
    max-width: 520px;
    margin: 12px 0 0;
    color: var(--text-muted);
    line-height: 1.75;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
}

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

[hidden] {
    display: none !important;
}

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

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

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

    .rank-panel {
        position: static;
    }
}

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

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

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        order: 4;
    }

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

    .header-search {
        width: 100%;
        order: 5;
    }

    .hero-carousel {
        min-height: 900px;
    }

    .hero-content,
    .detail-inner {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 100px;
    }

    .hero-poster,
    .detail-poster {
        width: min(260px, 70vw);
        transform: none;
    }

    .hero-search-card {
        grid-template-columns: 1fr;
        bottom: 18px;
    }

    .hero-dots {
        bottom: 208px;
    }

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

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

    .rank-row {
        grid-template-columns: 44px 72px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .rank-cover img {
        width: 72px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .container,
    .hero-content,
    .hero-search-card,
    .header-inner,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: clamp(34px, 13vw, 52px);
    }

    .hero-summary,
    .page-hero p,
    .detail-one-line {
        font-size: 15px;
    }

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

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

    .movie-card p {
        min-height: 54px;
        font-size: 12px;
    }

    .tag-row span {
        font-size: 11px;
    }

    .detail-info-card div {
        grid-template-columns: 1fr;
    }
}
