: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;
    --accent: #3b82f6;
    --accent-2: #22d3ee;
    --accent-3: #8b5cf6;
    --warning: #facc15;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.55);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #ffffff;
}

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

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

.nav-links a {
    padding: 10px 13px;
    border-radius: 999px;
    color: var(--soft);
    font-size: 14px;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.8);
}

.hero {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    padding-top: 72px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

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

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
    filter: blur(2px) saturate(1.05);
    opacity: 0.36;
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.22) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.08) 0%, #020617 100%);
}

.hero-grid {
    position: relative;
    z-index: 2;
    min-height: 648px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: center;
    gap: 54px;
}

.hero-copy {
    max-width: 720px;
}

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

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 18px 0 18px;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    background: linear-gradient(135deg, #ffffff 0%, #bfdbfe 48%, #67e8f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy p,
.page-hero p,
.lead-text {
    margin: 0;
    max-width: 720px;
    color: var(--soft);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-tags,
.tag-line,
.filter-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-line span,
.detail-meta span,
.detail-meta a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.58);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 18px 38px rgba(59, 130, 246, 0.28);
}

.btn.ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
    position: relative;
    display: block;
    width: min(420px, 100%);
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 34px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.4);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
    transition: transform 0.35s ease;
}

.hero-poster:hover {
    transform: rotate(0deg) translateY(-6px) scale(1.02);
}

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

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

.hero-controls button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.7);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-controls button:hover {
    background: rgba(59, 130, 246, 0.8);
    transform: translateY(-2px);
}

.section {
    padding: 72px 0;
}

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

.section-head.compact {
    align-items: center;
    margin-bottom: 20px;
}

.section-head h2,
.story-card h2,
.side-card h2,
.player-title-row h2 {
    margin: 8px 0 0;
    color: #ffffff;
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.more-link {
    color: #bfdbfe;
    font-weight: 800;
}

.more-link:hover {
    color: #ffffff;
}

.search-band {
    padding: 28px 0 0;
}

.search-panel,
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.search-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.62));
    box-shadow: 0 16px 50px rgba(2, 6, 23, 0.2);
}

.search-panel h2 {
    margin: 8px 0 0;
}

.search-box {
    width: min(480px, 100%);
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.55);
}

.search-box.wide {
    width: min(720px, 100%);
}

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

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

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.25);
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-card:hover img {
    transform: scale(1.08);
    opacity: 0.9;
}

.category-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.92) 100%);
}

.category-content {
    position: absolute;
    inset: auto 18px 18px 18px;
    display: grid;
    gap: 8px;
}

.category-content strong {
    font-size: 21px;
}

.category-content em {
    color: var(--soft);
    font-size: 13px;
    line-height: 1.55;
    font-style: normal;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.62));
    box-shadow: 0 16px 46px rgba(2, 6, 23, 0.22);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

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

.play-chip {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.card-body {
    padding: 16px;
}

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

.card-body h3 {
    margin: 10px 0 9px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: #93c5fd;
}

.card-body p {
    margin: 0;
    min-height: 68px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.tag-line {
    margin-top: 14px;
    gap: 6px;
}

.tag-line span {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 12px;
}

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

.rank-panel,
.rank-page-panel,
.story-card,
.side-card,
.player-panel {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 20px 70px rgba(2, 6, 23, 0.22);
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 40px 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.32);
    transition: background 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
    background: rgba(30, 41, 59, 0.72);
    transform: translateX(4px);
}

.rank-number {
    color: var(--warning);
    font-size: 17px;
    font-weight: 900;
}

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

.rank-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

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

.rank-copy small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-action {
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 800;
}

.rank-page-panel {
    padding: 22px;
}

.page-main {
    padding-top: 72px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 64px;
    background:
        radial-gradient(circle at 10% 0%, rgba(59, 130, 246, 0.24), transparent 30rem),
        radial-gradient(circle at 90% 20%, rgba(34, 211, 238, 0.16), transparent 26rem);
}

.page-hero::after,
.detail-hero-section::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.28), transparent);
}

.page-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 22px;
}

.page-hero h1 {
    margin-bottom: 0;
}

.toolbar {
    align-items: stretch;
    flex-direction: column;
}

.filter-row {
    margin-top: 12px;
}

.filter-btn {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.65);
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
    color: #ffffff;
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(59, 130, 246, 0.32);
}

.hidden-by-filter {
    display: none !important;
}

.detail-hero-section {
    position: relative;
    padding: 46px 0 64px;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 12%, rgba(59, 130, 246, 0.2), transparent 28rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.88), transparent);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 28px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.7);
    box-shadow: var(--shadow);
}

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

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

.detail-meta {
    margin-top: 24px;
}

.genre-tags {
    margin-top: 18px;
}

.player-section {
    padding-top: 0;
}

.player-panel {
    padding: 22px;
}

.player-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

.video-frame video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.16), rgba(2, 6, 23, 0.74));
    cursor: pointer;
}

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

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    font-size: 30px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 20px 46px rgba(59, 130, 246, 0.35);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    align-items: start;
}

.story-card,
.side-card {
    padding: 28px;
}

.story-card p {
    color: var(--soft);
    font-size: 16px;
    line-height: 1.9;
}

.second-kicker {
    margin-top: 30px;
}

.side-card {
    position: sticky;
    top: 96px;
}

.side-card dl {
    display: grid;
    gap: 14px;
    margin: 18px 0 0;
}

.side-card div {
    display: grid;
    gap: 5px;
}

.side-card dt {
    color: var(--muted);
    font-size: 13px;
}

.side-card dd {
    margin: 0;
    color: #ffffff;
    line-height: 1.6;
}

.site-footer {
    margin-top: 36px;
    padding: 42px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.13);
    background: rgba(2, 6, 23, 0.64);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.6fr);
    gap: 32px;
}

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

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

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

.footer-links a:hover {
    color: #ffffff;
    border-color: rgba(34, 211, 238, 0.35);
}

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

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

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

    .rank-panel,
    .side-card {
        position: static;
    }

    .hero-poster {
        width: min(320px, 80%);
        margin: 0;
    }
}

@media (max-width: 820px) {
    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: absolute;
        left: 14px;
        right: 14px;
        top: 78px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 22px;
        background: rgba(2, 6, 23, 0.95);
        box-shadow: var(--shadow);
    }

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

    .nav-links a {
        border-radius: 14px;
    }

    .hero {
        min-height: 760px;
    }

    .hero-grid {
        min-height: 688px;
        grid-template-columns: 1fr;
        align-content: center;
        gap: 30px;
    }

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

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

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

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

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

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

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

    .hero {
        min-height: 820px;
    }

    .hero-actions,
    .search-panel {
        align-items: stretch;
    }

    .btn,
    .search-box {
        width: 100%;
    }

    .category-grid,
    .movie-grid,
    .movie-grid.small-grid,
    .movie-grid.highlight-grid {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 34px 48px minmax(0, 1fr);
    }

    .rank-action {
        display: none;
    }

    .story-card,
    .side-card,
    .player-panel,
    .rank-page-panel {
        padding: 18px;
        border-radius: 22px;
    }

    .play-circle {
        width: 66px;
        height: 66px;
        font-size: 24px;
    }
}
