:root {
    color-scheme: dark;
    --bg-0: #020617;
    --bg-1: #0f172a;
    --bg-2: #111827;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(6, 182, 212, 0.45);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --blue: #2563eb;
    --orange: #fb923c;
    --yellow: #facc15;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at 82% 16%, rgba(37, 99, 235, 0.14), transparent 34rem),
        linear-gradient(180deg, var(--bg-0), var(--bg-1) 42%, var(--bg-0));
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

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

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

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

.brand-text {
    font-size: 1.34rem;
    background: linear-gradient(90deg, #67e8f9, #3b82f6);
    -webkit-background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: var(--soft);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--cyan);
}

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

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-strong);
}

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

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

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.70) 42%, rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, var(--bg-0), transparent 46%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1240px) / 2));
    bottom: 12%;
    width: min(680px, calc(100% - 48px));
}

.hero-tags,
.card-meta,
.row-tags,
.detail-tags,
.hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.card-meta span,
.row-tags span,
.detail-tags a,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(8, 145, 178, 0.15);
    font-size: 0.78rem;
    line-height: 1;
}

.hero h1 {
    margin: 22px 0 16px;
    font-size: clamp(2.4rem, 7vw, 5.3rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero p {
    width: min(640px, 100%);
    margin: 0 0 24px;
    color: var(--soft);
    font-size: 1.1rem;
    line-height: 1.8;
}

.hero-meta {
    margin-bottom: 30px;
    color: var(--muted);
}

.hero-actions,
.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

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

.primary-button,
.global-search-form button {
    color: white;
    background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
    box-shadow: 0 18px 40px rgba(8, 145, 178, 0.24);
}

.ghost-button {
    border: 1px solid var(--line);
    color: var(--soft);
    background: rgba(15, 23, 42, 0.74);
}

.primary-button:hover,
.ghost-button:hover,
.global-search-form button:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: 0 22px 54px rgba(34, 211, 238, 0.24);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.45);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1240px) / 2));
    bottom: 44px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

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

.search-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 28px;
    align-items: center;
    margin-top: -42px;
    position: relative;
    z-index: 4;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-strip span,
.section-heading span,
.page-hero span,
.detail-kicker {
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.search-strip h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.story-panel h2,
.player-section h2,
.side-panel h2 {
    margin: 7px 0 0;
}

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

.global-search-form input,
.filter-panel input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.62);
    outline: none;
}

.global-search-form input:focus,
.filter-panel input:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.page-section {
    padding: 72px 0 0;
}

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

.section-heading h2 {
    font-size: clamp(1.45rem, 3vw, 2.15rem);
}

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

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

.movie-card {
    min-width: 0;
}

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    box-shadow: 0 24px 52px rgba(34, 211, 238, 0.12);
}

.card-poster {
    position: relative;
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    background: #0f172a;
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 54%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.card-score,
.card-play {
    position: absolute;
    z-index: 2;
}

.card-score {
    top: 12px;
    right: 12px;
    padding: 5px 8px;
    border-radius: 10px;
    color: #0f172a;
    background: var(--yellow);
    font-weight: 900;
    font-size: 0.82rem;
}

.card-play {
    left: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: rgba(8, 145, 178, 0.82);
    box-shadow: 0 14px 32px rgba(8, 145, 178, 0.36);
}

.card-body {
    display: flex;
    min-height: 204px;
    flex-direction: column;
    padding: 16px;
}

.card-body h2 {
    margin: 12px 0 8px;
    color: var(--text);
    font-size: 1.04rem;
    line-height: 1.35;
}

.card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    color: var(--muted);
    font-size: 0.85rem;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 28px;
    align-items: start;
}

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

.compact-card a,
.ranking-row a {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.58);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.compact-card a:hover,
.ranking-row a:hover {
    border-color: var(--line-strong);
    background: rgba(15, 23, 42, 0.86);
    transform: translateX(4px);
}

.compact-card img {
    width: 96px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
}

.compact-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.rank-number {
    color: var(--cyan);
    font-weight: 900;
}

.compact-card p,
.compact-card span {
    display: block;
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.55;
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.54);
}

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

.category-card,
.overview-card,
.story-panel,
.side-panel,
.player-section,
.detail-hero,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.18);
}

.category-card > a {
    display: block;
    padding: 22px;
}

.category-card h2,
.overview-card h2 {
    margin: 10px 0;
}

.category-card p,
.overview-card p,
.page-hero p,
.detail-one-line,
.story-panel p {
    color: var(--soft);
    line-height: 1.75;
}

.category-mini-links,
.overview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 22px 22px;
}

.category-mini-links a,
.overview-links a,
.side-list a,
.side-list span {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(2, 6, 23, 0.55);
    font-size: 0.82rem;
}

.content-page {
    padding-top: 34px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 340px;
    display: flex;
    align-items: center;
    padding: 44px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(120deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72)),
        radial-gradient(circle at 90% 20%, rgba(34, 211, 238, 0.24), transparent 28rem);
}

.category-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62)),
        var(--hero-poster);
    background-size: cover;
    background-position: center;
    opacity: 0.7;
}

.page-hero > div {
    position: relative;
    max-width: 720px;
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.04em;
}

.small-hero {
    min-height: 280px;
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 26px;
    padding: 20px;
}

.filter-panel label span {
    display: block;
    margin-bottom: 8px;
    color: var(--cyan);
    font-weight: 800;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chips button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--soft);
    background: rgba(2, 6, 23, 0.54);
    cursor: pointer;
}

.filter-chips button.is-active,
.filter-chips button:hover {
    border-color: var(--line-strong);
    color: white;
    background: rgba(8, 145, 178, 0.36);
}

.overview-card {
    overflow: hidden;
}

.overview-cover {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: 150px;
    background: #0f172a;
}

.overview-cover img {
    width: 100%;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
}

.overview-body {
    padding: 20px;
}

.ranking-row a {
    grid-template-columns: 54px 118px minmax(0, 1fr) auto;
    padding: 14px;
}

.ranking-row strong {
    color: var(--cyan);
    font-size: 1.26rem;
}

.ranking-row img {
    width: 118px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-row h2 {
    margin: 0 0 8px;
}

.ranking-row p {
    margin: 0 0 10px;
    color: var(--muted);
}

.ranking-row em {
    color: var(--yellow);
    font-style: normal;
    font-weight: 900;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 10px 0 22px;
    color: var(--muted);
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 32px;
    padding: 28px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    background: #0f172a;
}

.detail-poster img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
}

.detail-info h1 {
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.detail-meta div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.48);
}

.detail-meta span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.82rem;
}

.detail-meta strong {
    color: var(--text);
}

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

.player-section {
    margin-top: 28px;
    padding: 24px;
}

.player-section h2 {
    margin-bottom: 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: #000;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-curtain {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: white;
    background:
        radial-gradient(circle at center, rgba(8, 145, 178, 0.34), transparent 22rem),
        linear-gradient(0deg, rgba(2, 6, 23, 0.70), rgba(2, 6, 23, 0.26));
    cursor: pointer;
}

.player-curtain span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
    box-shadow: 0 18px 50px rgba(8, 145, 178, 0.38);
    font-size: 1.8rem;
}

.player-shell.is-playing .player-curtain {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

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

.story-panel,
.side-panel {
    padding: 26px;
}

.story-panel h2:not(:first-child) {
    margin-top: 30px;
}

.side-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

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

.site-footer {
    margin-top: 86px;
    padding: 42px 0 30px;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 32px;
}

.footer-grid p {
    max-width: 560px;
    color: var(--muted);
    line-height: 1.75;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: var(--muted);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
}

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

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

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

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

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

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

    .rank-panel {
        position: static;
    }

    .detail-poster img {
        min-height: 360px;
    }
}

@media (max-width: 760px) {
    .header-inner,
    .search-strip,
    .page-section,
    .content-page,
    .site-footer,
    .mobile-nav {
        width: min(100% - 22px, 1240px);
    }

    .hero {
        min-height: 78vh;
    }

    .hero-content {
        left: 18px;
        bottom: 10%;
        width: calc(100% - 36px);
    }

    .hero-arrow {
        display: none;
    }

    .hero-dots {
        right: 18px;
        bottom: 18px;
    }

    .search-strip,
    .global-search-form,
    .footer-grid,
    .footer-bottom {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .global-search-form {
        display: grid;
    }

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

    .page-hero,
    .detail-hero,
    .player-section,
    .story-panel,
    .side-panel {
        padding: 20px;
        border-radius: 20px;
    }

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

    .ranking-row a {
        grid-template-columns: 40px 84px minmax(0, 1fr);
    }

    .ranking-row em {
        grid-column: 3;
    }

    .ranking-row img {
        width: 84px;
        height: 64px;
    }
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 1.05rem;
    }

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

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

    .primary-button,
    .ghost-button {
        width: 100%;
    }
}
