:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --amber: #fbbf24;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 28rem),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.16), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    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: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
    z-index: -1;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

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

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

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.main-nav a {
    color: #cbd5e1;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 14px;
    transition: 0.22s ease;
}

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

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

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #e2e8f0;
    border-radius: 20px;
}

.hero-shell {
    width: min(1340px, calc(100% - 24px));
    min-height: 680px;
    margin: 18px auto 0;
    position: relative;
    border: 1px solid var(--line);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #020617;
}

.hero-stage,
.hero-slide {
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 52px;
    padding: 88px clamp(24px, 7vw, 92px);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.7s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.36) 100%),
        radial-gradient(circle at 24% 20%, rgba(34, 211, 238, 0.22), transparent 34rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.92));
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.25);
    transform: scale(1.08);
    opacity: 0.58;
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 1;
}

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

.hero-content h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(44px, 7vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.08em;
}

.hero-summary {
    max-width: 680px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.8;
}

.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

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

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

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.22s ease;
}

.primary-btn {
    padding: 0 24px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 42px rgba(34, 211, 238, 0.22);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(59, 130, 246, 0.32);
}

.ghost-btn {
    padding: 0 20px;
    color: #dbeafe;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.6);
}

.ghost-btn:hover {
    border-color: rgba(34, 211, 238, 0.58);
    background: rgba(34, 211, 238, 0.12);
}

.hero-poster {
    align-self: center;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.44);
    transform: rotate(2deg);
}

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

.hero-poster span,
.score,
.detail-poster span {
    position: absolute;
    right: 12px;
    top: 12px;
    display: grid;
    place-items: center;
    min-width: 46px;
    min-height: 34px;
    padding: 4px 8px;
    color: #1c1200;
    background: linear-gradient(135deg, #fde68a, var(--amber));
    border-radius: 999px;
    font-weight: 900;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: clamp(24px, 7vw, 92px);
    bottom: 48px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 99px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.26);
}

.hero-dot.active {
    width: 64px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    gap: 18px;
    margin-top: 28px;
}

.search-box,
.quick-links,
.search-workbench {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-box {
    padding: 22px;
}

.search-box label,
.search-workbench label {
    display: block;
    margin-bottom: 10px;
    color: var(--cyan);
    font-weight: 800;
}

.search-box div,
.search-workbench div {
    display: flex;
    gap: 10px;
}

.search-box input,
.search-workbench input,
.search-workbench select {
    width: 100%;
    min-height: 48px;
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    outline: 0;
    background: rgba(2, 6, 23, 0.78);
    padding: 0 16px;
}

.search-box button,
.search-workbench button {
    min-width: 94px;
    border: 0;
    border-radius: 16px;
    color: #00111a;
    font-weight: 900;
    cursor: pointer;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.quick-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
}

.quick-links a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.1);
    color: #cffafe;
}

.section-block {
    margin-top: 58px;
}

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

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

.section-heading p:not(.eyebrow) {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

.category-card {
    min-height: 220px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0f172a;
    box-shadow: var(--shadow);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 18%, rgba(2, 6, 23, 0.9) 100%);
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    transition: 0.3s ease;
}

.category-card:hover img {
    transform: scale(1.06);
}

.category-card span,
.category-card strong {
    position: absolute;
    z-index: 1;
    left: 18px;
    right: 18px;
}

.category-card span {
    bottom: 64px;
    font-size: 22px;
    font-weight: 900;
}

.category-card strong {
    bottom: 18px;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.55;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 18px 52px rgba(2, 6, 23, 0.28);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

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

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

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

.score {
    font-size: 14px;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 36px;
    min-height: 36px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

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

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

.movie-card h2 a:hover {
    color: var(--cyan);
}

.meta-line {
    margin: 8px 0;
    color: #93c5fd;
    font-size: 13px;
}

.one-line {
    min-height: 72px;
    margin: 0 0 14px;
    color: #cbd5e1;
    line-height: 1.65;
    font-size: 14px;
}

.rank-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 20px;
    box-shadow: var(--shadow);
}

.rank-panel h2 {
    margin: 0 0 18px;
    font-size: 24px;
}

.rank-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    transition: 0.22s ease;
}

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

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

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

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

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

.rank-row b {
    color: var(--amber);
}

.page-hero {
    padding: 82px 0 54px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.18), transparent 30rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.48));
}

.page-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1;
    letter-spacing: -0.07em;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 18px 0 0;
    color: #cbd5e1;
    line-height: 1.85;
    font-size: 18px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

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

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

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

.category-overview-card p:not(.eyebrow) {
    color: #cbd5e1;
    line-height: 1.8;
}

.listing-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
}

.sticky-panel {
    position: sticky;
    top: 92px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 56px 0 66px;
    border-bottom: 1px solid var(--line);
}

.detail-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.96));
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.2);
    transform: scale(1.08);
    opacity: 0.52;
}

.detail-head > span,
.breadcrumb {
    color: #bae6fd;
    font-size: 14px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    margin-top: 24px;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.detail-one-line {
    max-width: 780px;
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 20px;
    line-height: 1.85;
}

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

.player-section {
    margin-top: 36px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 16px;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
}

.play-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 999px;
    font-size: 32px;
    box-shadow: 0 18px 54px rgba(34, 211, 238, 0.32);
}

.play-cover strong {
    font-size: 24px;
}

.detail-columns {
    grid-template-columns: minmax(0, 1fr) 360px;
}

.detail-article {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    padding: clamp(22px, 4vw, 42px);
    box-shadow: var(--shadow);
}

.detail-article h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

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

.detail-article p {
    color: #dbeafe;
    line-height: 2;
    font-size: 17px;
}

.search-workbench {
    padding: 22px;
}

.result-count {
    margin: 18px 0;
    color: var(--muted);
}

.search-results:empty {
    display: none;
}

.site-footer {
    margin-top: 72px;
    padding: 42px 0;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.84);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.6fr) minmax(220px, 0.8fr);
    gap: 32px;
}

.footer-brand {
    margin-bottom: 14px;
}

.site-footer p,
.site-footer a {
    color: #94a3b8;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

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

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

@media (max-width: 1120px) {
    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 260px;
    }

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

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

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

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

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        border-radius: 12px;
    }

    .hero-shell,
    .hero-stage,
    .hero-slide {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 58px 24px 112px;
    }

    .hero-poster {
        width: min(250px, 70vw);
        justify-self: start;
    }

    .search-panel,
    .two-column,
    .listing-layout,
    .detail-columns,
    .footer-grid,
    .detail-layout,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .sticky-panel {
        position: static;
    }

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

@media (max-width: 680px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .brand {
        font-size: 20px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.04em;
    }

    .hero-shell,
    .hero-stage,
    .hero-slide {
        min-height: 720px;
    }

    .hero-summary,
    .detail-one-line,
    .page-hero p:not(.eyebrow) {
        font-size: 16px;
    }

    .hero-dots {
        left: 24px;
        bottom: 28px;
    }

    .search-box div,
    .search-workbench div {
        flex-direction: column;
    }

    .search-box button,
    .search-workbench button {
        min-height: 46px;
    }

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

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

    .movie-card h2 {
        font-size: 16px;
    }

    .one-line {
        min-height: 86px;
        font-size: 13px;
    }

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

    .detail-layout {
        gap: 22px;
    }

    .detail-poster {
        width: min(250px, 72vw);
    }

    .detail-article p {
        font-size: 15px;
    }

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