:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-soft: rgba(30, 41, 59, 0.62);
    --border: rgba(6, 182, 212, 0.22);
    --border-soft: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --blue: #3b82f6;
    --pink: #ec4899;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 8%, rgba(6, 182, 212, 0.18), transparent 28rem),
        radial-gradient(circle at 85% 18%, rgba(59, 130, 246, 0.14), transparent 30rem),
        linear-gradient(135deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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: 46px 46px;
    mask-image: linear-gradient(to bottom, black, transparent 70%);
}

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

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

button,
input {
    font: inherit;
}

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

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

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.site-logo-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(34, 211, 238, 0.42);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.95), rgba(59, 130, 246, 0.92));
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.28);
}

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

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

.nav-link:hover,
.nav-link-active {
    border-color: rgba(34, 211, 238, 0.36);
    background: rgba(6, 182, 212, 0.14);
    color: #e0faff;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
    color: var(--text);
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: var(--text);
}

.hero {
    position: relative;
    min-height: calc(100vh - 72px);
    overflow: hidden;
    border-bottom: 1px solid rgba(6, 182, 212, 0.16);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    align-items: center;
    gap: 4vw;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 136px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(24px) scale(0.98);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-media {
    position: relative;
    min-height: 520px;
    border-radius: 36px;
    isolation: isolate;
}

.hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 36px;
    box-shadow: var(--shadow);
}

.hero-media::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    border-radius: 36px;
    background:
        linear-gradient(to top, rgba(2, 6, 23, 0.72), transparent 54%),
        linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent 45%);
}

.hero-glow {
    position: absolute;
    inset: 12% -8% -8% 8%;
    z-index: -1;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.32), rgba(59, 130, 246, 0.18));
    filter: blur(44px);
}

.hero-copy {
    position: relative;
    z-index: 3;
}

.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-info h1 {
    margin: 0;
    font-size: clamp(36px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-summary {
    max-width: 700px;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
}

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

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

.hero-tags span,
.detail-tags span,
.card-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;
    background: rgba(6, 182, 212, 0.12);
    color: #cffafe;
    font-size: 12px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #001018;
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.24);
}

.btn-secondary {
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.62);
    color: #e2e8f0;
}

.hero-controls {
    position: absolute;
    right: min(5vw, 70px);
    bottom: 38px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: var(--text);
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.78);
    font-size: 30px;
    line-height: 1;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-thumbs {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    display: flex;
    width: min(740px, calc(100% - 32px));
    gap: 12px;
    transform: translateX(-50%);
}

.hero-thumb {
    display: grid;
    grid-template-columns: 54px 1fr;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(14px);
}

.hero-thumb img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
}

.hero-thumb span {
    overflow: hidden;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-panel,
.page-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 460px);
    align-items: center;
    gap: 24px;
    margin-top: 36px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.search-panel h2,
.page-hero h1 {
    margin: 0;
}

.search-panel p:last-child,
.page-hero p:last-child {
    margin-bottom: 0;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.55);
}

.search-box span {
    color: var(--cyan);
    font-size: 22px;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.search-box input::placeholder {
    color: #64748b;
}

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

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

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

.section-heading p:not(.eyebrow) {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
}

.section-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.64);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 24px 56px rgba(6, 182, 212, 0.12);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 2.75;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(59, 130, 246, 0.08));
}

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

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

.card-poster::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(2, 6, 23, 0.72), transparent 55%);
}

.poster-year,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-year {
    top: 12px;
    left: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.76);
    color: #cffafe;
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.92);
    color: #001018;
    font-weight: 900;
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.32);
}

.card-body {
    padding: 16px;
}

.card-tags {
    margin-bottom: 12px;
}

.card-body h3 {
    min-height: 54px;
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: #67e8f9;
}

.card-body p {
    min-height: 66px;
    margin: 10px 0 14px;
    color: #a7b4c7;
    font-size: 14px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 13px;
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 118px 1fr;
    min-height: 172px;
}

.movie-card-compact .card-poster {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card-compact .card-body h3 {
    min-height: auto;
}

.movie-card-compact .card-body p {
    min-height: auto;
}

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

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

.category-tile {
    position: relative;
    min-height: 190px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(59, 130, 246, 0.08)),
        rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile::after {
    position: absolute;
    right: -28px;
    bottom: -42px;
    width: 130px;
    height: 130px;
    content: "";
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.14);
    filter: blur(10px);
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.5);
}

.category-tile span {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
}

.category-tile h3 {
    margin: 18px 0 8px;
    font-size: 22px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
}

.page-main {
    padding-bottom: 70px;
}

.page-hero {
    display: block;
    margin-top: 42px;
}

.page-hero h1 {
    font-size: clamp(34px, 6vw, 64px);
}

.page-hero p {
    max-width: 760px;
    color: #cbd5e1;
}

.page-search {
    max-width: 560px;
    margin-top: 24px;
}

.pill-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 28px;
}

.pill-link {
    padding: 9px 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    color: #cbd5e1;
}

.pill-link:hover,
.pill-link.is-current {
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(6, 182, 212, 0.16);
    color: #e0faff;
}

.detail-main {
    padding-bottom: 80px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    isolation: isolate;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: -2;
}

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

.detail-hero::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background:
        linear-gradient(to bottom, rgba(2, 6, 23, 0.42), #020617 95%),
        radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.16), transparent 34rem);
}

.detail-wrap {
    padding-top: 36px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 34px;
    color: #a7b4c7;
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    max-width: 820px;
}

.detail-one-line {
    max-width: 820px;
    margin: 22px 0;
    color: #dbeafe;
    font-size: 20px;
}

.detail-tags {
    margin-bottom: 22px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 760px;
    gap: 10px;
    margin: 0 0 30px;
}

.detail-meta span {
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.56);
    color: #cbd5e1;
}

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

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    width: 100%;
    border: 0;
    background:
        radial-gradient(circle at center, rgba(6, 182, 212, 0.18), transparent 18rem),
        linear-gradient(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.24));
    color: #ecfeff;
    cursor: pointer;
}

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

.overlay-icon {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #001018;
    font-size: 34px;
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.38);
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding-top: 40px;
}

.story-card {
    padding: 26px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.64);
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.story-card p:last-child {
    margin: 0;
    color: #cbd5e1;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.66);
}

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

.footer-logo {
    margin-bottom: 12px;
}

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

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

.footer-links a {
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    color: #cbd5e1;
}

.footer-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #64748b;
    font-size: 13px;
}

[data-card].is-hidden {
    display: none;
}

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        padding-top: 44px;
    }

    .hero-media {
        min-height: 420px;
        order: 2;
    }

    .hero-thumbs {
        display: none;
    }
}

@media (max-width: 760px) {
    .site-header-inner {
        min-height: 64px;
    }

    .nav-toggle {
        display: block;
    }

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

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

    .hero {
        min-height: auto;
    }

    .hero-slide {
        width: min(100% - 24px, 620px);
        padding-bottom: 96px;
    }

    .hero-media {
        min-height: 320px;
        border-radius: 24px;
    }

    .hero-media img,
    .hero-media::after {
        border-radius: 24px;
    }

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

    .hero-controls {
        right: 50%;
        bottom: 24px;
        transform: translateX(50%);
    }

    .search-panel,
    .page-hero {
        grid-template-columns: 1fr;
        padding: 22px;
        border-radius: 22px;
    }

    .section-heading {
        display: block;
    }

    .section-action {
        margin-top: 12px;
    }

    .movie-grid,
    .rank-grid,
    .category-grid,
    .category-grid-large,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .movie-card-compact {
        grid-template-columns: 108px 1fr;
    }

    .detail-hero {
        min-height: auto;
        padding-bottom: 108px;
    }

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

    .detail-poster {
        max-width: 280px;
    }

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

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

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

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

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

    .hero-slide {
        width: min(100% - 22px, 620px);
    }

    .hero-actions {
        display: grid;
    }

    .movie-card-compact {
        grid-template-columns: 1fr;
    }

    .movie-card-compact .card-poster {
        aspect-ratio: 2 / 2.65;
    }
}
