:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --blue: #38bdf8;
    --cyan: #22d3ee;
    --indigo: #2563eb;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 8%, rgba(56, 189, 248, 0.22), transparent 30rem),
        radial-gradient(circle at 82% 12%, rgba(37, 99, 235, 0.22), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #07111f 48%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

main {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
}

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

.header-inner {
    width: min(1440px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    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;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: #e0f2fe;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(34, 211, 238, 0.9));
    box-shadow: 0 16px 36px rgba(14, 165, 233, 0.28);
}

.brand-text {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    background: linear-gradient(90deg, #60a5fa, #67e8f9, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    color: var(--soft);
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
    color: #dff7ff;
    background: rgba(56, 189, 248, 0.13);
}

.menu-toggle {
    display: none;
    border: 0;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 14px;
    padding: 10px;
}

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

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

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.hero {
    position: relative;
    min-height: clamp(620px, 82vh, 860px);
    margin: 26px 0 56px;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 50px;
    padding: clamp(34px, 6vw, 86px);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg,
.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-position: center;
    background-size: cover;
    filter: saturate(1.18);
}

.hero-bg::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 26% 36%, rgba(56, 189, 248, 0.28), transparent 26rem),
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.86));
}

.eyebrow {
    margin: 0 0 10px;
    color: #67e8f9;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5.6rem);
    line-height: 1.02;
    letter-spacing: -0.08em;
}

.hero-summary,
.page-hero p,
.detail-line {
    max-width: 760px;
    margin: 22px 0 0;
    color: var(--soft);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
}

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

.hero-tags span,
.tag-row span {
    padding: 6px 10px;
    border: 1px solid rgba(125, 211, 252, 0.2);
    border-radius: 999px;
    color: #d8f3ff;
    background: rgba(14, 165, 233, 0.12);
    font-size: 0.82rem;
}

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

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

.btn-primary {
    color: #00111d;
    background: linear-gradient(135deg, #67e8f9, #60a5fa);
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.28);
}

.btn-secondary,
.section-more {
    color: #e0f2fe;
    border: 1px solid rgba(125, 211, 252, 0.2);
    background: rgba(15, 23, 42, 0.78);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-more:hover,
.movie-card:hover,
.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-3px);
}

.hero-poster,
.detail-poster {
    position: relative;
    isolation: isolate;
    min-height: 520px;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.24);
    border-radius: 30px;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.22), rgba(8, 47, 73, 0.9));
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.52);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.22), rgba(8, 47, 73, 0.92));
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 2;
}

.poster-wrap img.is-missing {
    display: none;
}

.poster-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    color: rgba(224, 242, 254, 0.82);
    font-size: 1rem;
    font-weight: 900;
    text-align: center;
    z-index: 1;
}

.poster-fallback.large {
    font-size: clamp(1.45rem, 3vw, 2.4rem);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    padding: 6px 10px;
    color: #dff7ff;
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    font-size: 0.8rem;
    font-weight: 800;
}

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

.hero-dot {
    width: 38px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.5);
    cursor: pointer;
}

.hero-dot.active {
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
}

.search-panel,
.page-hero,
.content-section,
.rank-panel,
.player-section,
.detail-text {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px;
    margin-bottom: 28px;
}

.search-panel h2,
.section-head h2,
.article-block h2,
.rank-panel h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2.8vw, 2.2rem);
    letter-spacing: -0.04em;
}

.search-box {
    width: min(100%, 520px);
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

.search-box.inline {
    margin-top: 26px;
}

.search-box input {
    width: 100%;
    min-height: 50px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 16px;
    outline: none;
    padding: 0 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.65);
    font-size: 1rem;
}

.content-section,
.player-section,
.detail-text {
    margin: 28px 0;
    padding: clamp(20px, 3vw, 32px);
}

.content-section.no-margin {
    margin: 0;
}

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

.section-head.small {
    align-items: center;
}

.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,
.category-card-large {
    position: relative;
    overflow: hidden;
    min-height: 164px;
    padding: 18px;
    border: 1px solid rgba(125, 211, 252, 0.16);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.13), rgba(15, 23, 42, 0.86));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile span,
.category-card-large h2 {
    display: block;
    color: #e0f2fe;
    font-size: 1.1rem;
    font-weight: 900;
}

.category-tile strong {
    display: block;
    margin: 14px 0 8px;
    color: #67e8f9;
    font-size: 2rem;
}

.category-tile p,
.category-card-large p,
.category-card-large small,
.site-footer p,
.article-block p {
    color: var(--soft);
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    border-color: rgba(125, 211, 252, 0.42);
    box-shadow: 0 22px 58px rgba(2, 6, 23, 0.38);
}

.movie-card .poster-wrap {
    height: 250px;
}

.card-body {
    padding: 14px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.card-body h3 {
    margin: 8px 0 0;
    font-size: 1rem;
    line-height: 1.35;
}

.card-line {
    min-height: 54px;
    margin: 8px 0 0;
    color: var(--soft);
    font-size: 0.88rem;
}

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

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
}

.rank-list {
    display: grid;
    gap: 10px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.38);
}

.rank-num,
.rank-dot {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #00111d;
    border-radius: 12px;
    background: linear-gradient(135deg, #67e8f9, #60a5fa);
    font-weight: 900;
    font-size: 0.82rem;
}

.rank-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.rank-title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 850;
}

.rank-extra {
    color: var(--muted);
    font-size: 0.82rem;
}

.page-hero.slim {
    position: relative;
    overflow: hidden;
    margin: 26px 0 28px;
    padding: clamp(34px, 6vw, 72px);
}

.page-hero.slim::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto auto;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.18);
    filter: blur(42px);
    pointer-events: none;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    margin: 26px 0 28px;
    padding: clamp(28px, 5vw, 64px);
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.detail-layout {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: clamp(26px, 5vw, 56px);
    align-items: center;
}

.detail-poster {
    height: 500px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    margin-bottom: 18px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(125, 211, 252, 0.2);
    background: #000;
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #e0f2fe;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.18), rgba(2, 6, 23, 0.66));
    cursor: pointer;
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: block;
    border-radius: 999px;
    background: linear-gradient(135deg, #67e8f9, #60a5fa);
    box-shadow: 0 18px 42px rgba(14, 165, 233, 0.32);
    position: relative;
}

.play-icon::after {
    content: "";
    position: absolute;
    left: 32px;
    top: 24px;
    border-left: 22px solid #00111d;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
}

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

.article-block {
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.36);
}

.article-page {
    max-width: 900px;
}

.site-footer {
    width: min(1440px, calc(100% - 32px));
    margin: 56px auto 0;
    padding: 34px 0 40px;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr));
    gap: 28px;
}

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

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

.footer-copy {
    margin-top: 24px;
    color: var(--muted);
}

[data-card].hidden,
.rank-item.hidden {
    display: none;
}

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

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    main,
    .header-inner,
    .site-footer,
    .mobile-nav {
        width: min(100% - 24px, 720px);
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 760px;
        border-radius: 26px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 30px;
    }

    .hero-poster {
        min-height: 340px;
        max-width: 280px;
        width: 100%;
    }

    .search-panel,
    .section-head,
    .footer-grid,
    .detail-layout,
    .detail-text {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

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

    .detail-poster {
        max-width: 320px;
        height: 460px;
    }
}

@media (max-width: 560px) {
    .category-grid,
    .category-grid.large,
    .movie-grid,
    .movie-grid.compact,
    .rank-list.all {
        grid-template-columns: 1fr;
    }

    .movie-card .poster-wrap {
        height: 330px;
    }

    .hero {
        min-height: 840px;
    }

    .hero-controls {
        left: 30px;
    }
}
