:root {
    color-scheme: dark;
    --bg: #07111f;
    --bg-soft: #0c1728;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --brand: #22d3ee;
    --brand-2: #a78bfa;
    --hot: #f97316;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.18), transparent 32rem),
        radial-gradient(circle at 86% 12%, rgba(167, 139, 250, 0.16), transparent 30rem),
        linear-gradient(180deg, #07111f 0%, #0a1222 46%, #060b14 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

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

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

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #03101f;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.2);
}

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

.nav-link {
    padding: 10px 13px;
    border-radius: 999px;
    color: #cbd5e1;
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #ffffff;
}

.hero-section {
    position: relative;
    min-height: 680px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.24;
    filter: blur(4px) saturate(1.08);
}

.hero-bg::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 17, 31, 0.97) 0%, rgba(7, 17, 31, 0.72) 45%, rgba(7, 17, 31, 0.98) 100%),
        linear-gradient(180deg, rgba(7, 17, 31, 0.28) 0%, #07111f 100%);
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.65fr;
    align-items: center;
    gap: 48px;
    min-height: 680px;
    padding: 74px 0 82px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 12px 0 18px;
    font-size: clamp(40px, 7vw, 84px);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.lead-text {
    max-width: 680px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.9;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

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

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

.hero-tag,
.tag,
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.06);
    font-size: 12px;
}

.pill.active {
    color: #04111f;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

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

.primary-btn,
.ghost-btn,
.section-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, background 0.2s ease;
}

.primary-btn {
    color: #04111f;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 20px 42px rgba(34, 211, 238, 0.2);
}

.ghost-btn,
.section-link {
    border: 1px solid var(--line);
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}

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

.hero-poster,
.detail-poster {
    min-height: 520px;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(1.5deg);
}

.hero-poster img,
.detail-poster img,
.poster-frame img,
.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 4;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dot.active {
    width: 34px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.search-panel,
.section-block,
.story-card,
.rank-panel,
.category-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 420px);
    align-items: center;
    gap: 24px;
    margin-top: -46px;
    padding: 22px;
    position: relative;
    z-index: 5;
}

.search-panel h2,
.section-heading h2,
.story-card h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.04em;
}

.search-panel p {
    margin: 8px 0 0;
    color: var(--muted);
}

.search-box {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.search-box span {
    color: var(--brand);
    font-weight: 800;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

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

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

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

.compact-heading {
    margin-bottom: 16px;
}

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

.small-grid {
    grid-template-columns: repeat(4, 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, background 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(15, 23, 42, 0.94);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 16%, rgba(34, 211, 238, 0.36), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(88, 28, 135, 0.42));
}

.poster-frame img {
    transition: transform 0.28s ease, opacity 0.2s ease;
}

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

.poster-fade {
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.74));
}

.poster-type {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.74);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.movie-body {
    padding: 16px;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card p {
    display: -webkit-box;
    min-height: 4.8em;
    margin: 0 0 12px;
    overflow: hidden;
    color: #aab6c6;
    font-size: 13px;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.compact .movie-body {
    padding: 13px;
}

.compact h3 {
    font-size: 15px;
}

.compact p {
    min-height: 3.2em;
    -webkit-line-clamp: 2;
}

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

.category-card {
    padding: 20px;
}

.category-title {
    display: inline-flex;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 900;
}

.category-card p {
    min-height: 5em;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.mini-links,
.side-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-links a,
.side-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.07);
    font-size: 12px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
}

.rank-panel {
    position: sticky;
    top: 94px;
    align-self: start;
    padding: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 40px 62px 1fr;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.09);
}

.rank-num {
    color: var(--hot);
    font-size: 18px;
    font-weight: 900;
}

.rank-cover {
    height: 84px;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(167, 139, 250, 0.18));
}

.rank-copy {
    min-width: 0;
}

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

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

.rank-copy em {
    margin: 4px 0;
    color: var(--brand);
    font-size: 12px;
    font-style: normal;
}

.rank-copy small {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.page-hero {
    position: relative;
    padding: 94px 0 34px;
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 16% 20%, rgba(34, 211, 238, 0.18), transparent 22rem),
        radial-gradient(circle at 72% 10%, rgba(167, 139, 250, 0.16), transparent 26rem);
    pointer-events: none;
}

.page-hero .site-shell {
    position: relative;
}

.compact-hero {
    padding-bottom: 22px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #94a3b8;
    font-size: 14px;
}

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

.page-search {
    margin-top: 12px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 74px 0 30px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    filter: blur(8px) saturate(1.1);
}

.detail-hero-inner {
    position: relative;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 32px;
}

.detail-poster {
    min-height: 450px;
    transform: none;
}

.detail-copy h1 {
    font-size: clamp(38px, 6vw, 72px);
}

.large-tags .tag {
    min-height: 36px;
    padding: 8px 13px;
}

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

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.18), transparent 24rem),
        rgba(2, 6, 23, 0.28);
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    color: #04111f;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 26px 70px rgba(34, 211, 238, 0.32);
    font-size: 32px;
}

.player-card.playing .player-overlay {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 310px;
    gap: 18px;
}

.story-card {
    padding: 24px;
}

.story-card p {
    margin: 14px 0 0;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.95;
}

.info-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px 12px;
    margin: 16px 0 20px;
}

.info-card dt {
    color: var(--muted);
}

.info-card dd {
    margin: 0;
    color: #e2e8f0;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    padding: 34px 0;
}

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

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

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
}

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

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

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

    .rank-panel {
        position: static;
    }
}

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

    .nav-menu {
        position: fixed;
        inset: 72px 16px auto;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(7, 17, 31, 0.96);
        box-shadow: var(--shadow);
    }

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

    .hero-content,
    .detail-grid,
    .search-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        min-height: 720px;
        padding-top: 62px;
    }

    .hero-poster {
        min-height: 360px;
        transform: none;
    }

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

    .full-rank {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .site-shell {
        width: min(100% - 22px, 1180px);
    }

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

    .section-block,
    .search-panel,
    .story-card {
        padding: 18px;
        border-radius: 20px;
    }

    .hero-section,
    .hero-content {
        min-height: 680px;
    }

    .movie-body {
        padding: 12px;
    }

    .rank-item {
        grid-template-columns: 34px 54px 1fr;
    }

    .rank-cover {
        height: 74px;
    }
}
