:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.88);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --pink: #f472b6;
    --amber: #fbbf24;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(2, 8, 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 20% 0%, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(244, 114, 182, 0.14), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 50%, #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;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.58));
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #a5f3fc 45%, var(--pink));
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.25);
}

.brand-copy {
    display: grid;
    line-height: 1.12;
}

.brand-copy strong {
    font-size: 20px;
    letter-spacing: 0.04em;
}

.brand-copy small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

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

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

.nav-link:hover,
.nav-link.active {
    color: #ecfeff;
    background: rgba(34, 211, 238, 0.13);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.66);
    border-radius: 999px;
}

.header-search input,
.search-panel input,
.filter-bar input {
    color: var(--text);
    border: 0;
    outline: 0;
    background: transparent;
}

.header-search input {
    width: 190px;
    padding: 6px 10px;
}

.header-search button,
.search-panel button,
.filter-chips button {
    border: 0;
    cursor: pointer;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.8);
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.96);
}

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

main {
    overflow: hidden;
}

.hero-shell {
    position: relative;
    min-height: 760px;
    padding-top: 76px;
    isolation: isolate;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(16px) saturate(1.08);
    transform: scale(1.05);
    opacity: 0.36;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 48%, rgba(2, 6, 23, 0.45) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.28) 0%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 420px;
    gap: 56px;
    align-items: center;
    padding: 92px 0 96px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    color: #a5f3fc;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 8px 12px;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.1);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

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

.tag-pill,
.detail-meta span,
.rank-tags span,
.poster-badge {
    color: #cffafe;
    border: 1px solid rgba(34, 211, 238, 0.22);
    background: rgba(15, 23, 42, 0.66);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.rank-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 18px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #a5f3fc);
    box-shadow: 0 16px 42px rgba(34, 211, 238, 0.24);
}

.ghost-btn,
.section-more,
.rank-action {
    color: #e0f2fe;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.58);
}

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

.hero-poster,
.detail-poster,
.poster-wrap,
.rank-cover,
.category-poster-stack {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 20%, rgba(34, 211, 238, 0.22), transparent 42%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
}

.hero-poster {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 34px;
    min-height: 560px;
    box-shadow: var(--shadow);
}

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

.hero-poster span {
    position: absolute;
    right: 20px;
    bottom: 20px;
    color: #00111a;
    background: #a5f3fc;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 36px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.66);
    backdrop-filter: blur(16px);
}

.hero-arrow,
.hero-dot {
    cursor: pointer;
    border: 0;
}

.hero-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--text);
    background: rgba(148, 163, 184, 0.18);
    font-size: 26px;
    line-height: 1;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.45);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section,
.page-hero,
.detail-hero,
.breadcrumb {
    width: min(1240px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

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

.intro-section {
    padding-top: 72px;
}

.intro-grid,
.detail-text-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 24px;
    align-items: stretch;
}

.intro-grid,
.category-card,
.category-overview-card,
.detail-article,
.search-panel,
.video-shell,
.player-section,
.page-hero,
.detail-hero {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.28);
}

.intro-grid {
    padding: 34px;
}

.intro-grid h2,
.section-heading h2,
.detail-article h2,
.player-section h2 {
    margin: 10px 0 12px;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.intro-grid p,
.section-heading p,
.detail-article p,
.category-card strong,
.category-overview-main p {
    color: var(--soft);
    line-height: 1.8;
}

.intro-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.intro-stats a {
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(15, 23, 42, 0.72));
    border: 1px solid rgba(34, 211, 238, 0.16);
}

.intro-stats strong {
    display: block;
    font-size: 24px;
}

.intro-stats span {
    display: block;
    color: var(--muted);
    margin-top: 6px;
}

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

.section-heading span {
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: 0.14em;
    font-size: 12px;
}

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

.category-card {
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.38);
}

.category-name,
.category-count {
    display: inline-flex;
    color: #a5f3fc;
    font-weight: 900;
}

.category-card strong {
    display: block;
    margin: 12px 0 14px;
    font-size: 18px;
}

.mini-links,
.category-samples,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-links a,
.category-samples a,
.footer-links a {
    color: var(--muted);
    font-size: 13px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
}

.filter-bar input {
    flex: 1;
    min-width: 220px;
    padding: 13px 14px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chips button {
    color: #e0f2fe;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.22);
}

.filter-chips button:hover,
.filter-chips button.active {
    color: #00111a;
    background: var(--cyan);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-wrap {
    display: block;
    aspect-ratio: 2 / 3;
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.poster-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
}

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

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

.movie-card h3 a:hover,
.rank-content h3 a:hover,
.breadcrumb a:hover {
    color: var(--cyan);
}

.movie-meta,
.movie-desc {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.movie-desc {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 78px 64px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 12px 16px 12px 12px;
}

.rank-cover {
    width: 78px;
    height: 104px;
    border-radius: 16px;
}

.rank-number {
    color: var(--cyan);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.rank-content h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-content p {
    margin: 0 0 10px;
    color: var(--soft);
    line-height: 1.6;
}

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

.page-hero {
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.page-hero::after,
.detail-hero::after {
    content: "";
    position: absolute;
    inset: -30% -20% auto auto;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.16);
    filter: blur(36px);
    pointer-events: none;
}

.slim-hero h1,
.category-page-hero h1 {
    font-size: clamp(36px, 5vw, 62px);
}

.category-overview-card {
    padding: 20px;
}

.category-overview-main {
    display: grid;
    grid-template-columns: 156px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.category-poster-stack {
    min-height: 180px;
    border-radius: 20px;
}

.category-poster-stack img {
    position: absolute;
    width: 48%;
    height: 74%;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.42);
}

.category-poster-stack img:nth-child(1) {
    left: 8%;
    top: 14%;
    z-index: 3;
}

.category-poster-stack img:nth-child(2) {
    left: 28%;
    top: 8%;
    z-index: 2;
}

.category-poster-stack img:nth-child(3) {
    left: 48%;
    top: 18%;
    z-index: 1;
}

.category-overview-main span {
    color: var(--cyan);
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 0.14em;
}

.category-overview-main h2 {
    margin: 8px 0 10px;
    font-size: 28px;
}

.category-samples {
    margin-top: 18px;
}

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

.detail-hero {
    position: relative;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 28px;
    overflow: hidden;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border-radius: 26px;
}

.detail-copy {
    position: relative;
    z-index: 1;
}

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

.detail-meta {
    margin: 18px 0;
}

.player-section {
    width: min(1240px, calc(100% - 32px));
    margin: 32px auto 0;
    padding: 24px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    margin-top: 18px;
    background: #000;
}

.video-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.video-start {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-content: center;
    gap: 12px;
    cursor: pointer;
    border: 0;
    color: var(--text);
    background: radial-gradient(circle at center, rgba(34, 211, 238, 0.2), rgba(2, 6, 23, 0.74));
}

.video-start.hidden {
    display: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 50%;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #a5f3fc);
    font-size: 34px;
    box-shadow: 0 18px 48px rgba(34, 211, 238, 0.28);
}

.video-start strong {
    font-size: 20px;
}

.detail-text-grid {
    align-items: start;
}

.detail-article {
    padding: 28px;
}

.search-panel {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 16px;
}

.search-panel input {
    flex: 1;
    min-height: 50px;
    padding: 0 14px;
}

.search-panel button {
    min-width: 110px;
}

.search-result-meta {
    min-height: 28px;
    color: var(--muted);
    margin: 16px 0;
}

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

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

.footer-brand {
    color: var(--cyan);
    font-size: 24px;
}

.site-footer p {
    color: var(--muted);
    line-height: 1.8;
    margin: 12px 0 0;
}

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

@media (max-width: 1120px) {
    .header-search {
        display: none;
    }

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 340px;
    }

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

@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-shell {
        min-height: 860px;
    }

    .hero-content,
    .detail-hero,
    .intro-grid,
    .detail-text-grid,
    .footer-inner,
    .category-overview-main {
        grid-template-columns: 1fr;
    }

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

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

    .filter-bar,
    .section-heading,
    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

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

    .rank-number {
        grid-column: 1;
        grid-row: 1;
    }

    .rank-cover {
        display: none;
    }

    .rank-action {
        grid-column: 2;
        width: fit-content;
    }
}

@media (max-width: 560px) {
    .header-inner {
        width: min(100% - 20px, 1240px);
    }

    .brand-copy small {
        display: none;
    }

    .hero-shell {
        min-height: 780px;
    }

    .hero-content {
        width: min(100% - 20px, 1240px);
        gap: 24px;
        padding-top: 56px;
    }

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

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

    .page-hero,
    .detail-hero,
    .intro-grid,
    .player-section,
    .detail-article {
        padding: 22px;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .intro-stats {
        grid-template-columns: 1fr;
    }
}
