:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --brand: #0284c7;
    --brand-strong: #0369a1;
    --accent: #38bdf8;
    --gold: #f59e0b;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
    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(14, 165, 233, 0.16), transparent 36rem),
        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,
video {
    max-width: 100%;
    display: block;
}

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), #7dd3fc);
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.28);
    font-size: 14px;
}

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

.nav-link {
    color: var(--muted);
    padding: 9px 12px;
    border-radius: 999px;
    transition: 0.25s ease;
    font-size: 15px;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(14, 165, 233, 0.18);
}

.nav-link-soft {
    color: #bae6fd;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(360px, 34vw);
}

.header-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    color: var(--text);
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 11px 15px;
    outline: none;
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(56, 189, 248, 0.62);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.header-search button,
.filter-panel button {
    color: white;
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    background: var(--brand);
    cursor: pointer;
    transition: 0.25s ease;
}

.header-search button:hover,
.filter-panel button:hover {
    background: var(--brand-strong);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    color: white;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.84);
    border-radius: 12px;
    padding: 8px 11px;
}

.mobile-nav {
    display: none;
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

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

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

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.72) 46%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.28) 42%, transparent 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1320px) / 2));
    bottom: 96px;
    width: min(760px, calc(100% - 64px));
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: white;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content h1,
.hero-content h2 {
    font-size: clamp(38px, 6vw, 76px);
}

.hero-content p,
.page-hero p,
.detail-one-line,
.home-intro p {
    color: var(--muted);
    line-height: 1.8;
    font-size: 18px;
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 12px;
    padding: 0 22px;
    font-weight: 800;
    transition: 0.25s ease;
}

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--brand), #0ea5e9);
    box-shadow: 0 18px 42px rgba(14, 165, 233, 0.22);
}

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

.secondary-button {
    color: #e0f2fe;
    border: 1px solid rgba(125, 211, 252, 0.36);
    background: rgba(15, 23, 42, 0.62);
}

.full-width {
    width: 100%;
}

.category-pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.24);
    border: 1px solid rgba(125, 211, 252, 0.24);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(2, 6, 23, 0.58);
    border-radius: 999px;
    cursor: pointer;
    font-size: 34px;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 32px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    transition: 0.25s ease;
}

.hero-dot.active {
    width: 36px;
    background: white;
}

.home-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 40px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(8, 47, 73, 0.45));
    box-shadow: var(--shadow);
}

.home-intro h2,
.section-heading h2,
.text-panel h2,
.detail-content-main h2,
.site-footer h2 {
    margin: 0;
    color: white;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.home-intro h2,
.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.intro-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

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

.section-heading a {
    color: var(--accent);
    font-weight: 800;
}

.section-heading.compact {
    align-items: center;
}

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

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

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

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

.movie-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    transition: 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: 0 24px 70px rgba(14, 165, 233, 0.16);
}

.movie-card-link {
    display: block;
    height: 100%;
}

.movie-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.movie-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.35s ease;
}

.movie-card:hover img {
    transform: scale(1.06);
}

.duration {
    position: absolute;
    right: 10px;
    top: 10px;
    border-radius: 999px;
    padding: 4px 9px;
    color: white;
    background: rgba(2, 6, 23, 0.78);
    font-size: 12px;
    font-weight: 800;
}

.play-mark {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: white;
    opacity: 0;
    font-size: 42px;
    background: rgba(2, 6, 23, 0.28);
    transition: 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    min-height: 48px;
    margin: 0 0 8px;
    color: white;
    font-size: 17px;
    line-height: 1.42;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-info p {
    margin: 0 0 14px;
    min-height: 43px;
    color: var(--subtle);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-bottom,
.movie-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--subtle);
    font-size: 13px;
}

.movie-meta-line {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.rating {
    color: var(--gold);
    font-weight: 900;
}

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

.movie-card-horizontal .movie-card-link {
    display: grid;
    grid-template-columns: 190px 1fr;
    min-height: 132px;
}

.horizontal-thumb {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card-large {
    grid-column: span 2;
}

.large-thumb {
    aspect-ratio: 21 / 9;
}

.large-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 26px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.02));
}

.large-overlay h3 {
    margin: 12px 0 8px;
    font-size: 28px;
}

.large-overlay p {
    color: var(--muted);
    line-height: 1.7;
}

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

.category-tile,
.category-overview-card a {
    display: grid;
    gap: 8px;
    min-height: 132px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.48));
    transition: 0.25s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.42);
}

.category-tile span,
.category-count {
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}

.category-tile strong,
.category-overview-card h2 {
    color: white;
    font-size: 22px;
}

.category-tile em {
    color: var(--subtle);
    font-style: normal;
}

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

.category-overview-card p {
    color: var(--muted);
    line-height: 1.8;
}

.category-overview-card strong {
    color: var(--accent);
}

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

.ranking-panel,
.text-panel {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    padding: 24px;
}

.rank-list {
    display: grid;
    gap: 9px;
    padding: 0;
    margin: 0 0 18px;
    list-style: none;
}

.rank-list a {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
}

.rank-number,
.ranking-index {
    color: var(--accent);
    font-weight: 900;
}

.rank-title {
    color: white;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-score,
.ranking-score {
    color: var(--gold);
    font-weight: 900;
}

.hot-block {
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.72), rgba(2, 6, 23, 0.82));
}

.page-hero {
    min-height: 360px;
    display: grid;
    place-items: center;
    padding: 72px 16px;
    background:
        radial-gradient(circle at 20% 10%, rgba(14, 165, 233, 0.28), transparent 28rem),
        linear-gradient(135deg, #0f172a, #020617);
    border-bottom: 1px solid var(--line);
}

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

.page-hero-inner {
    width: min(1120px, 100%);
    text-align: center;
}

.page-hero h1 {
    margin-top: 16px;
    font-size: clamp(36px, 6vw, 66px);
}

.page-hero p {
    max-width: 760px;
    margin: 18px auto 0;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 160px 160px auto;
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
}

.filter-result {
    min-height: 22px;
    margin: 0 0 20px;
    color: var(--subtle);
}

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

.ranking-row a {
    display: grid;
    grid-template-columns: 58px 96px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    transition: 0.25s ease;
}

.ranking-row a:hover {
    border-color: rgba(56, 189, 248, 0.42);
    transform: translateY(-2px);
}

.ranking-row img {
    width: 96px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.ranking-main {
    display: grid;
    gap: 5px;
}

.ranking-main strong {
    color: white;
    font-size: 18px;
}

.ranking-main em {
    color: var(--subtle);
    font-style: normal;
}

.detail-hero {
    min-height: 620px;
    display: grid;
    align-items: end;
    padding: 96px 0 64px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--line);
}

.detail-hero-inner {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: end;
    gap: 34px;
}

.detail-poster {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

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

.breadcrumb a {
    color: #bae6fd;
}

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

.detail-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-meta span,
.tag-row span {
    color: #dbeafe;
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 800;
}

.video-player {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: black;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    color: white;
    border: 0;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.28), rgba(2, 6, 23, 0.42));
    cursor: pointer;
    transition: 0.25s ease;
}

.player-overlay span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.92);
    box-shadow: 0 22px 54px rgba(14, 165, 233, 0.35);
    font-size: 28px;
}

.video-player.playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 58px 0 8px;
}

.detail-content-main {
    display: grid;
    gap: 22px;
}

.text-panel p,
.info-list {
    color: var(--muted);
    line-height: 1.9;
}

.text-panel h2 {
    margin-bottom: 16px;
    font-size: 24px;
}

.detail-side {
    display: grid;
    gap: 22px;
    align-content: start;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
}

.info-list dt {
    color: var(--subtle);
}

.info-list dd {
    margin: 0;
    color: white;
}

.info-list a {
    color: var(--accent);
}

.full-tags span {
    font-size: 13px;
}

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

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

.footer-brand {
    color: white;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
}

.site-footer p,
.site-footer li {
    color: var(--subtle);
    line-height: 1.8;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: grid;
    gap: 8px;
}

.site-footer a:hover {
    color: var(--accent);
}

[data-card].is-hidden {
    display: none;
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

    .header-search {
        width: min(460px, 48vw);
        margin-left: auto;
    }

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

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

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

    .ranking-panel {
        order: -1;
    }
}

@media (max-width: 860px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 14px 0;
    }

    .header-search {
        order: 3;
        width: 100%;
    }

    .hero-carousel {
        min-height: 620px;
    }

    .hero-content {
        left: 22px;
        bottom: 88px;
        width: calc(100% - 44px);
    }

    .hero-nav {
        display: none;
    }

    .home-intro,
    .section-heading,
    .ranking-row a {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

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

    .movie-card-large {
        grid-column: span 2;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: min(260px, 72vw);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .brand {
        font-size: 18px;
    }

    .hero-content h1,
    .hero-content h2,
    .detail-info h1,
    .page-hero h1 {
        font-size: 34px;
    }

    .hero-content p,
    .page-hero p,
    .detail-one-line,
    .home-intro p {
        font-size: 16px;
    }

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

    .movie-card-large {
        grid-column: span 1;
    }

    .movie-card-horizontal .movie-card-link {
        grid-template-columns: 1fr;
    }

    .horizontal-thumb {
        aspect-ratio: 16 / 9;
    }

    .hot-block,
    .home-intro {
        padding: 22px;
    }

    .detail-meta span,
    .tag-row span {
        font-size: 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}
