
:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --amber: #f59e0b;
    --rose: #f43f5e;
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at 70% 20%, rgba(244, 63, 94, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    min-height: 100vh;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

main {
    overflow: hidden;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.28));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #00131a;
    background: linear-gradient(135deg, var(--cyan), #67e8f9 50%, var(--amber));
    box-shadow: 0 0 34px rgba(34, 211, 238, 0.32);
}

.brand-copy {
    display: grid;
    line-height: 1.15;
}

.brand-copy strong {
    font-size: 18px;
    letter-spacing: 0.02em;
}

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

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

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

.nav-link {
    padding: 10px 14px;
    font-size: 14px;
}

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.68);
    color: var(--text);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 999px;
}

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

.mobile-link {
    display: block;
    padding: 12px 14px;
}

.hero-carousel {
    position: relative;
    height: 74vh;
    min-height: 560px;
    background: #020617;
}

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 900ms ease;
}

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.06) contrast(1.04);
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.05) 38%, rgba(2, 6, 23, 0.65) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 120px 0 88px;
}

.hero-copy {
    width: min(720px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 12px 0 16px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.78;
    max-width: 760px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.hero-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-btn,
.ghost-btn,
.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, border-color 0.2s ease;
}

.primary-btn {
    padding: 13px 22px;
    color: #00131a;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.28);
}

.ghost-btn {
    padding: 12px 20px;
    color: #e2e8f0;
    border: 1px solid rgba(226, 232, 240, 0.24);
    background: rgba(15, 23, 42, 0.48);
}

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

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 1px solid rgba(226, 232, 240, 0.22);
    color: #fff;
    background: rgba(15, 23, 42, 0.68);
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
}

.hero-dot.is-active {
    width: 28px;
    border-radius: 999px;
    background: var(--cyan);
}

.search-panel,
.content-section,
.detail-content,
.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.search-panel {
    margin-top: -44px;
    position: relative;
    z-index: 10;
    padding: 22px;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 22px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

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

.search-controls {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 12px;
}

.search-input,
.search-select {
    width: 100%;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.62);
    padding: 13px 14px;
    outline: none;
}

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

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

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

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.58));
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.48);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

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

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #00131a;
    background: rgba(103, 232, 249, 0.92);
    font-size: 12px;
    font-weight: 800;
}

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

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

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

.movie-card p {
    margin: 0 0 14px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.7;
}

.tag-row span {
    padding: 4px 8px;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.12);
}

.split-layout {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 28px;
}

.compact-heading {
    margin-bottom: 18px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 64px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.7);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-num {
    color: var(--cyan);
    font-weight: 900;
    font-size: 20px;
}

.rank-item img {
    width: 64px;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-info {
    display: grid;
    gap: 5px;
}

.rank-info strong {
    font-size: 16px;
}

.rank-info em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

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

.category-tile,
.category-overview-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile {
    padding: 14px;
    min-height: 210px;
    display: grid;
    align-content: space-between;
}

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

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

.category-images img {
    aspect-ratio: 2 / 3;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.category-tile strong {
    margin-top: 14px;
    font-size: 20px;
}

.category-tile em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 150px 0 58px;
    min-height: 380px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 36px;
    align-items: end;
}

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

.hero-poster-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    transform: rotate(2deg);
}

.hero-poster-stack img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

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

.category-overview-card {
    padding: 18px;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
}

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

.category-poster-stack img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

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

.category-overview-card p {
    color: #cbd5e1;
    line-height: 1.72;
}

.detail-hero {
    position: relative;
    min-height: 660px;
    display: flex;
    align-items: flex-end;
    padding: 120px 0 60px;
    overflow: hidden;
}

.detail-backdrop,
.detail-backdrop img {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(16px) brightness(0.48) saturate(1.12);
    transform: scale(1.08);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.7) 45%, rgba(2, 6, 23, 0.78) 100%);
}

.detail-layout {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
    align-items: end;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

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

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

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 14px;
    color: #fff;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.72));
    border: 0;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #00131a;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    box-shadow: 0 0 42px rgba(34, 211, 238, 0.46);
    font-size: 30px;
}

.detail-content {
    padding: 54px 0 0;
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 28px;
}

.detail-article,
.detail-side {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    padding: 24px;
}

.detail-article + .detail-article {
    margin-top: 18px;
}

.detail-article h2,
.detail-side h2 {
    margin: 10px 0 14px;
    font-size: 26px;
}

.detail-article p {
    color: #dbeafe;
    line-height: 1.9;
    margin: 0;
}

.detail-side dl {
    margin: 0;
    display: grid;
    gap: 12px;
}

.detail-side div {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    padding-bottom: 12px;
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
    color: #e2e8f0;
}

.related-section {
    padding-top: 54px;
}

.empty-state {
    display: none;
    margin: 24px 0 0;
    color: var(--muted);
    text-align: center;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.64);
}

.empty-state.is-visible {
    display: block;
}

.searchable-card.is-hidden {
    display: none;
}

.site-footer {
    margin-top: 84px;
    padding: 34px 0 42px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1fr;
    gap: 24px;
}

.footer-brand {
    font-size: 22px;
}

.site-footer p {
    color: var(--muted);
    line-height: 1.72;
}

.footer-links {
    display: grid;
    gap: 10px;
    align-content: start;
}

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

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

.copyright {
    margin-top: 28px;
    font-size: 13px;
}

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

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

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

    .detail-layout {
        grid-template-columns: 220px 1fr;
    }
}

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

    .menu-toggle {
        display: block;
    }

    body.menu-open .mobile-nav {
        display: grid;
    }

    .hero-carousel {
        min-height: 620px;
        height: 82vh;
    }

    .hero-content {
        padding-bottom: 96px;
    }

    .search-panel {
        grid-template-columns: 1fr;
        margin-top: -32px;
    }

    .search-controls {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

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

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

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

    .detail-poster {
        width: min(220px, 62vw);
    }

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

@media (max-width: 540px) {
    .nav-shell,
    .search-panel,
    .content-section,
    .detail-content,
    .site-footer,
    .player-section,
    .page-hero,
    .detail-layout {
        width: min(100% - 22px, 1180px);
    }

    .brand-copy small {
        display: none;
    }

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

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

    .rank-item {
        grid-template-columns: 38px 58px 1fr;
    }

    .detail-hero {
        padding-top: 110px;
    }
}
