:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --purple: #a855f7;
    --orange: #f97316;
    --radius: 22px;
    --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 20% 10%, rgba(34, 211, 238, 0.16), transparent 34rem),
        radial-gradient(circle at 90% 20%, rgba(59, 130, 246, 0.16), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

.nav-shell {
    width: min(1200px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

.brand-text,
.footer-brand {
    font-size: 1.25rem;
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-links a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #cbd5e1;
    font-weight: 650;
    transition: 0.22s ease;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(34, 211, 238, 0.12);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #e2e8f0;
}

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

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

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 38%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.1) 0%, rgba(2, 6, 23, 0.95) 100%);
}

.hero-copy {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 82px 0 70px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border: 1px solid rgba(34, 211, 238, 0.34);
    border-radius: 999px;
    background: rgba(8, 47, 73, 0.46);
    color: #67e8f9;
    font-size: 0.85rem;
    font-weight: 800;
}

.hero-copy h1,
.page-hero h1 {
    max-width: 880px;
    margin: 0;
    font-size: clamp(2.3rem, 6vw, 5.8rem);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.07em;
    background: linear-gradient(90deg, #fff, #67e8f9, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy h2 {
    max-width: 720px;
    margin: 22px 0 0;
    font-size: clamp(1.6rem, 3.2vw, 3.4rem);
    font-weight: 850;
}

.hero-copy p,
.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 1.08rem;
    line-height: 1.85;
}

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

.primary-button,
.ghost-button,
.quick-search button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 850;
    transition: 0.22s ease;
}

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

.ghost-button,
.section-link {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
}

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

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--cyan);
    border-color: var(--cyan);
}

.quick-search-section {
    width: min(1080px, calc(100% - 32px));
    margin: -34px auto 0;
    position: relative;
    z-index: 5;
}

.quick-search,
.filter-bar {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
}

.quick-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    outline: none;
    background: rgba(2, 6, 23, 0.72);
    color: #fff;
    padding: 0 18px;
}

.filter-bar select {
    max-width: 220px;
}

.content-section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.muted-section {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1200px) / 2));
    padding-right: max(16px, calc((100% - 1200px) / 2));
    background: rgba(15, 23, 42, 0.42);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

.section-heading h2,
.panel-title h2,
.sidebar-card h2,
.detail-panel h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.55rem, 3vw, 2.45rem);
    font-weight: 900;
}

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

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

.movie-card,
.compact-card,
.rank-row,
.category-overview-card,
.sidebar-card,
.detail-panel,
.player-card,
.prose-panel,
.ranking-panel,
.category-tile {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.38);
    box-shadow: var(--shadow);
}

.card-link {
    display: block;
    height: 100%;
}

.cover-frame {
    position: relative;
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.12));
}

.wide-cover {
    aspect-ratio: 16 / 9;
}

.cover-frame img,
.compact-cover img,
.rank-cover img,
.detail-cover img,
.category-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.42s ease;
}

.movie-card:hover img,
.compact-card:hover img,
.rank-row:hover img {
    transform: scale(1.08);
}

.cover-frame figcaption {
    position: absolute;
    top: 12px;
    right: 12px;
    margin: 0;
    padding: 5px 9px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.card-tags,
.meta-row,
.tag-cloud,
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.card-tags span,
.meta-row span,
.tag-cloud span,
.chips span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.11);
    color: #67e8f9;
    font-size: 0.78rem;
    font-weight: 750;
}

.card-body h3,
.large-card-overlay h3,
.compact-card h3,
.rank-info h2 {
    margin: 12px 0 8px;
    color: #fff;
    font-weight: 850;
    line-height: 1.35;
}

.card-body p,
.large-card-overlay p,
.compact-card p,
.rank-info p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.65;
}

.card-body p,
.large-card-overlay p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-large {
    position: relative;
    min-height: 290px;
}

.large-card-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 26px;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 184px;
    padding: 24px;
    border-radius: var(--radius);
    transition: 0.25s ease;
}

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

.category-glow {
    position: absolute;
    inset: auto -30px -50px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.15);
    filter: blur(12px);
}

.category-tile strong {
    display: block;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 900;
}

.category-tile small {
    display: inline-block;
    margin-top: 8px;
    color: #67e8f9;
    font-weight: 800;
}

.category-tile p {
    color: var(--muted);
    line-height: 1.7;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
}

.compact-list {
    display: grid;
    gap: 14px;
}

.compact-card {
    border-radius: 16px;
    overflow: hidden;
}

.compact-card a {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px;
}

.compact-cover {
    width: 120px;
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(34, 211, 238, 0.1);
}

.compact-card h3 {
    margin: 0 0 6px;
    font-size: 0.98rem;
}

.compact-card p {
    font-size: 0.84rem;
}

.ranking-panel {
    align-self: start;
    position: sticky;
    top: 90px;
    padding: 24px;
    border-radius: var(--radius);
}

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

.ranking-list li {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.48);
}

.ranking-list span,
.rank-number {
    color: var(--cyan);
    font-weight: 950;
}

.ranking-list a {
    color: #fff;
    font-weight: 750;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-list small {
    color: var(--muted);
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0 22px;
}

.slim-hero {
    padding-top: 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: #94a3b8;
    font-size: 0.92rem;
}

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

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

.category-overview-card {
    overflow: hidden;
    border-radius: var(--radius);
    transition: 0.25s ease;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 132px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(168, 85, 247, 0.12));
}

.category-overview-body {
    padding: 20px;
}

.category-overview-body h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 900;
}

.category-overview-body p {
    min-height: 54px;
    color: var(--muted);
    line-height: 1.65;
}

.category-overview-body span {
    color: var(--cyan);
    font-weight: 850;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 70px 170px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    transition: 0.25s ease;
}

.rank-cover {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(34, 211, 238, 0.1);
}

.rank-info h2 {
    margin-top: 0;
    font-size: 1.22rem;
}

.search-console {
    display: grid;
    gap: 20px;
}

.search-count {
    margin: 0;
    color: var(--muted);
}

.detail-layout {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.detail-primary,
.detail-sidebar {
    display: grid;
    align-content: start;
    gap: 18px;
}

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

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00111a;
    font-weight: 950;
    box-shadow: 0 18px 50px rgba(34, 211, 238, 0.28);
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.play-overlay span {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}

.player-card.is-playing .play-overlay {
    display: none;
}

.detail-panel,
.sidebar-card,
.prose-panel {
    padding: 24px;
    border-radius: var(--radius);
}

.detail-panel h1 {
    margin: 18px 0 12px;
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 3.25rem);
    line-height: 1.15;
    font-weight: 950;
}

.one-line {
    margin: 0 0 18px;
    padding-left: 18px;
    border-left: 4px solid var(--cyan);
    color: #e2e8f0;
    font-size: 1.08rem;
    line-height: 1.8;
}

.detail-panel p,
.prose-panel p {
    color: #cbd5e1;
    line-height: 1.95;
    text-align: justify;
}

.detail-cover {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(34, 211, 238, 0.1);
}

.detail-cover img {
    aspect-ratio: 3 / 4;
}

.info-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    color: #fff;
}

.full-link {
    width: 100%;
    margin-top: 18px;
}

.prose-panel {
    max-width: 860px;
}

.prose-panel h2 {
    margin: 24px 0 8px;
    color: #fff;
    font-size: 1.55rem;
}

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

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 28px;
}

.site-footer p,
.site-footer a,
.site-footer li {
    color: #94a3b8;
    line-height: 1.75;
}

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

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #fff;
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #64748b;
}

[hidden],
.is-hidden {
    display: none !important;
}

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

    .overview-grid,
    .two-column-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
    }

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

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

    .hero-shade {
        background: linear-gradient(180deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.98));
    }

    .quick-search,
    .filter-bar,
    .section-heading,
    .footer-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar select {
        max-width: none;
    }

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

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

    .rank-info p,
    .rank-info .meta-row {
        display: none;
    }

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

    .compact-cover {
        width: 104px;
    }

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