* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.84);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --border: rgba(148, 163, 184, 0.18);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --faint: #64748b;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --blue: #2563eb;
    --pink: #f472b6;
    --amber: #f59e0b;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(8, 47, 73, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.18), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #07111f 48%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
}

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(--border);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(20px);
}

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

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

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

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

.main-nav a,
.footer-links a {
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.footer-links a:hover {
    color: var(--text);
    background: rgba(34, 211, 238, 0.12);
    transform: translateY(-1px);
}

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

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

.hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    min-height: 620px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 36px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.58fr);
    gap: 42px;
    align-items: center;
    padding: clamp(28px, 6vw, 72px);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.3;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(22px) saturate(1.28);
    transform: scale(1.12);
}

.hero::after,
.page-hero::after,
.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.44)),
        radial-gradient(circle at 75% 20%, rgba(34, 211, 238, 0.28), transparent 30rem);
}

.hero-content {
    max-width: 680px;
}

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

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 7vw, 82px);
    line-height: 0.94;
    font-weight: 950;
    letter-spacing: -0.07em;
}

.hero p,
.page-hero p,
.lead-text {
    max-width: 740px;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.tag-row,
.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-row span,
.inline-links a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.14);
    font-size: 13px;
}

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

.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #a7f3d0);
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.26);
}

.ghost-button {
    border: 1px solid var(--border);
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.72);
}

.small-button {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

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

.hero-poster {
    position: relative;
    display: block;
    align-self: stretch;
    min-height: 440px;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.7);
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.ranking-cover img,
.category-thumbs img,
.category-cover-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(34, 211, 238, 0.22), transparent);
}

.hero-controls {
    position: absolute;
    left: clamp(28px, 6vw, 72px);
    bottom: 32px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 38px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.24);
    cursor: pointer;
}

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

.content-section,
.quick-search,
.split-section,
.page-shell,
.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section,
.quick-search,
.split-section {
    padding: 68px 0 0;
}

.quick-search {
    display: grid;
    gap: 24px;
}

.quick-search > div:first-child,
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.quick-search h2,
.section-heading h2,
.player-section h2,
.content-card h2 {
    margin: 6px 0 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading p,
.content-card p,
.movie-card p,
.ranking-item p,
.footer-inner p,
.category-overview-card p {
    color: var(--muted);
}

.search-box {
    display: block;
}

.search-box input {
    width: 100%;
    min-height: 56px;
    padding: 0 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.86);
    box-shadow: inset 0 0 0 1px transparent;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.68));
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.56);
    box-shadow: 0 20px 60px rgba(8, 145, 178, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.poster-link img {
    transition: transform 0.5s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #00111a;
    background: var(--cyan);
    font-size: 12px;
    font-weight: 800;
}

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

.card-meta {
    color: var(--faint);
    font-size: 13px;
}

.movie-card h3,
.ranking-item h3,
.category-overview-card h2 {
    margin: 8px 0;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 850;
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 14px;
    font-size: 14px;
}

.text-link {
    min-height: auto;
    padding: 0;
    color: var(--cyan);
    font-size: 14px;
}

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

.category-tile {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile span {
    color: #e0f2fe;
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

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

.category-thumbs img,
.category-cover-strip img {
    aspect-ratio: 1;
    border-radius: 12px;
}

.split-section {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
}

.panel-block,
.page-hero,
.detail-hero,
.content-card,
.player-section,
.category-overview-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

.panel-block,
.player-section,
.content-card {
    padding: 24px;
}

.glow-panel {
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 22rem),
        rgba(15, 23, 42, 0.82);
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.42);
}

.ranking-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    border-radius: 16px;
}

.ranking-cover span {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #00111a;
    background: var(--cyan);
    font-size: 12px;
    font-weight: 900;
}

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

.page-hero {
    min-height: 360px;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
    gap: 28px;
    align-items: center;
    padding: clamp(26px, 5vw, 54px);
}

.compact-hero {
    display: block;
    min-height: auto;
}

.category-hero .hero-side-grid,
.ranking-hero .mini-grid {
    max-height: 520px;
    overflow: hidden;
}

.category-overview-grid {
    display: grid;
    gap: 18px;
}

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

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

.detail-shell {
    padding-top: 34px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin-bottom: 18px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 380px) 1fr;
    gap: 32px;
    align-items: center;
    padding: clamp(24px, 5vw, 48px);
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.72);
}

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

.detail-meta-grid span {
    display: grid;
    gap: 4px;
    min-height: 74px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.36);
}

.detail-meta-grid b {
    color: var(--faint);
    font-size: 12px;
}

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

.player-shell {
    position: relative;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    color: var(--text);
    border: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.76)),
        rgba(2, 6, 23, 0.2);
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.player-cover.is-hidden {
    display: none;
}

.play-circle {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), #a7f3d0);
    box-shadow: 0 20px 60px rgba(34, 211, 238, 0.38);
}

.play-circle::before {
    content: "";
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #00111a;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 28px;
}

.related-section {
    padding-bottom: 30px;
}

.empty-state {
    display: none;
    margin: 20px 0 0;
    color: var(--muted);
}

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

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

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

    .hero-slide,
    .page-hero,
    .detail-hero,
    .split-section,
    .detail-content,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 760px;
    }

    .hero-poster {
        min-height: 320px;
    }

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

@media (max-width: 720px) {
    .nav-shell {
        min-height: 64px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 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);
    }

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

    .hero {
        width: calc(100% - 20px);
        min-height: 720px;
        margin-top: 16px;
        border-radius: 26px;
    }

    .hero-slide {
        padding: 24px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 42px;
        letter-spacing: -0.05em;
    }

    .hero-controls {
        left: 24px;
        bottom: 22px;
    }

    .content-section,
    .quick-search,
    .split-section,
    .page-shell,
    .detail-shell {
        width: calc(100% - 20px);
    }

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

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

    .movie-card p,
    .tag-row {
        display: none;
    }

    .ranking-item {
        grid-template-columns: 92px 1fr;
    }

    .footer-inner {
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .compact-grid,
    .mini-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-poster {
        min-height: 260px;
    }
}
