:root {
    color-scheme: light;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --emerald-400: #34d399;
    --amber-400: #f59e0b;
    --white: #ffffff;
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
    --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--slate-900);
    background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-950), var(--slate-900), var(--slate-800));
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.26);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--emerald-400), var(--amber-400));
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.38);
}

.brand-text {
    display: grid;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.03em;
}

.brand-text small {
    margin-top: 4px;
    color: var(--slate-300);
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(16, 185, 129, 0.16);
    transform: translateY(-1px);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
}

.menu-toggle span {
    height: 2px;
    border-radius: 4px;
    background: var(--white);
}

.hero-carousel {
    position: relative;
    height: min(720px, 76vh);
    min-height: 560px;
    color: var(--white);
    overflow: hidden;
    background: var(--slate-950);
}

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

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

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 32%, rgba(16, 185, 129, 0.22), transparent 34%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.48) 46%, rgba(2, 6, 23, 0.82)),
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.36));
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow {
    padding: 8px 14px;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--emerald-400), var(--amber-400));
}

.hero-copy h1 {
    margin: 24px 0 16px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    color: var(--slate-200);
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.75;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--slate-100);
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span,
.detail-tags span {
    color: var(--white);
    background: rgba(16, 185, 129, 0.2);
}

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

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

.primary-btn {
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--emerald-400), var(--amber-400));
    box-shadow: 0 18px 35px rgba(16, 185, 129, 0.28);
}

.ghost-btn {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

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

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

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

.hero-dot.is-active {
    background: var(--emerald-400);
}

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

.search-section {
    margin-top: -36px;
    position: relative;
    z-index: 6;
}

.search-panel {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.search-panel input,
.local-filter input {
    width: 100%;
    min-height: 58px;
    padding: 0 22px;
    color: var(--slate-900);
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 999px;
    outline: none;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--soft-shadow);
}

.search-panel input:focus,
.local-filter input:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14), var(--soft-shadow);
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 30;
    display: none;
    max-height: 420px;
    overflow: auto;
    padding: 10px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.search-results.is-open {
    display: grid;
    gap: 8px;
}

.search-results a,
.search-results span {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--slate-800);
}

.search-results a:hover {
    background: var(--slate-100);
}

.search-results strong {
    font-size: 15px;
}

.search-results em {
    color: var(--slate-500);
    font-size: 12px;
    font-style: normal;
}

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

.section-head h2 {
    margin: 6px 0 0;
    color: var(--slate-950);
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-head > a,
.compact-head a {
    color: var(--emerald-600);
    font-weight: 800;
}

.section-kicker {
    color: var(--emerald-600);
    font-size: 12px;
}

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

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

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

.movie-card {
    min-width: 0;
}

.movie-link {
    display: grid;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--slate-800);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.36s ease;
}

.movie-link:hover .poster-wrap img {
    transform: scale(1.06);
}

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

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--slate-950);
    background: var(--emerald-400);
    font-size: 12px;
    font-weight: 900;
}

.movie-body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.movie-body strong {
    color: var(--slate-950);
    font-size: 18px;
    line-height: 1.3;
}

.movie-body em {
    color: var(--slate-500);
    font-size: 13px;
    font-style: normal;
}

.movie-desc {
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.65;
}

.movie-card.compact .movie-body strong {
    font-size: 16px;
}

.movie-card.compact .movie-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-tile {
    display: grid;
    gap: 10px;
    min-height: 136px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--white), rgba(236, 253, 245, 0.92));
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-tile span {
    color: var(--slate-950);
    font-size: 20px;
    font-weight: 900;
}

.category-tile em {
    color: var(--slate-600);
    font-style: normal;
    line-height: 1.7;
}

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

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    border-radius: var(--radius-xl);
    color: var(--white);
    background: linear-gradient(180deg, var(--slate-950), var(--slate-800));
    box-shadow: var(--shadow);
}

.ranking-panel h2,
.ranking-panel .section-head h2 {
    color: var(--white);
}

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

.rank-row a {
    display: grid;
    grid-template-columns: 42px 74px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.09);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row a:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateX(2px);
}

.rank-no {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--emerald-400), var(--amber-400));
    font-weight: 900;
}

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

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

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

.rank-copy em,
.rank-copy > span:not(.tag-row) {
    color: var(--slate-300);
    font-size: 13px;
    font-style: normal;
    line-height: 1.5;
}

.large-rank-list .rank-row a {
    grid-template-columns: 52px 92px minmax(0, 1fr);
    color: var(--slate-900);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.large-rank-list .rank-copy strong {
    color: var(--slate-950);
}

.large-rank-list .rank-copy em,
.large-rank-list .rank-copy > span:not(.tag-row) {
    color: var(--slate-600);
}

.page-hero {
    position: relative;
    padding: 96px 0 80px;
    color: var(--white);
    background:
        radial-gradient(circle at 18% 18%, rgba(16, 185, 129, 0.28), transparent 30%),
        linear-gradient(135deg, var(--slate-950), var(--slate-800));
    overflow: hidden;
}

.page-hero h1 {
    max-width: 860px;
    margin: 20px 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 780px;
    margin: 0 0 30px;
    color: var(--slate-200);
    font-size: 18px;
    line-height: 1.8;
}

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

.category-card-large a {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    min-height: 220px;
    padding: 18px;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card-large a:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-posters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-posters img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 14px;
}

.category-large-copy {
    display: grid;
    align-content: center;
    gap: 10px;
}

.category-large-copy h2 {
    margin: 0;
    color: var(--slate-950);
    font-size: 26px;
    font-weight: 900;
}

.category-large-copy p {
    margin: 0;
    color: var(--slate-600);
    line-height: 1.8;
}

.category-large-copy span {
    width: max-content;
    color: var(--emerald-600);
    font-weight: 900;
}

.local-filter {
    width: min(320px, 100%);
}

.local-filter input {
    min-height: 46px;
    box-shadow: none;
}

.detail-hero {
    position: relative;
    color: var(--white);
    overflow: hidden;
    background: var(--slate-950);
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.24;
    filter: blur(10px);
    transform: scale(1.05);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 25%, rgba(16, 185, 129, 0.24), transparent 30%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.76));
}

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    min-height: 520px;
    padding: 70px 0;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--slate-300);
    font-size: 14px;
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-copy p {
    max-width: 780px;
    margin: 0 0 22px;
    color: var(--slate-200);
    font-size: 19px;
    line-height: 1.8;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--slate-950);
    box-shadow: var(--shadow);
}

.main-video,
.player-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.main-video {
    background: var(--slate-950);
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 0;
    border: 0;
    background: var(--slate-950);
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
}

.player-cover.is-hidden {
    display: none;
}

.big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--emerald-400), var(--amber-400));
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.38);
    transform: translate(-50%, -50%);
    font-size: 34px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 34px;
    align-items: start;
}

.detail-article,
.detail-side {
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.detail-article {
    padding: 32px;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    color: var(--slate-950);
    font-size: 24px;
    font-weight: 900;
}

.detail-article p {
    margin: 0 0 28px;
    color: var(--slate-700);
    font-size: 17px;
    line-height: 2;
}

.detail-article p:last-child {
    margin-bottom: 0;
}

.detail-side {
    display: grid;
    gap: 10px;
    padding: 24px;
    position: sticky;
    top: 96px;
}

.detail-side a {
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--slate-700);
    background: var(--slate-100);
    line-height: 1.5;
}

.detail-side a:hover {
    color: var(--white);
    background: var(--emerald-600);
}

.site-footer {
    margin-top: 58px;
    color: var(--slate-300);
    background: var(--slate-950);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(180px, 1fr));
    gap: 34px;
    padding: 52px 0;
}

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

.site-footer p {
    max-width: 520px;
    margin: 0;
    color: var(--slate-400);
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 16px;
    font-weight: 900;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: var(--slate-400);
}

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

.footer-bottom {
    padding: 18px 0;
    text-align: center;
    color: var(--slate-500);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

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

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

    .ranking-panel,
    .detail-side {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-inner {
        min-height: 66px;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        display: none;
        padding: 14px 16px 20px;
        background: var(--slate-950);
        border-top: 1px solid rgba(148, 163, 184, 0.18);
    }

    .main-nav.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-link {
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.06);
    }

    .hero-carousel {
        height: auto;
        min-height: 640px;
    }

    .hero-copy {
        padding: 100px 0 80px;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

    .local-filter {
        width: 100%;
    }

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

    .category-card-large a {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .brand-text small {
        display: none;
    }

    .hero-actions {
        display: grid;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .movie-grid,
    .feature-grid,
    .catalogue-grid,
    .category-grid,
    .category-large-grid {
        grid-template-columns: 1fr;
    }

    .rank-row a,
    .large-rank-list .rank-row a {
        grid-template-columns: 38px 68px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-row img {
        width: 68px;
        height: 88px;
    }

    .detail-article {
        padding: 24px;
    }

    .big-play {
        width: 72px;
        height: 72px;
        font-size: 26px;
    }
}
