:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;
    --accent-50: #fffbeb;
    --accent-100: #fef3c7;
    --accent-500: #f59e0b;
    --accent-600: #d97706;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.16);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.11);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--neutral-50);
    color: var(--neutral-900);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--primary-800), var(--primary-600));
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(12, 74, 110, 0.22);
}

.nav-wrap {
    width: min(1280px, calc(100% - 32px));
    min-height: 64px;
    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-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent-500);
    color: #ffffff;
    font-size: 15px;
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.32);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 650;
}

.nav-link {
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-100);
}

.mobile-toggle {
    width: 44px;
    height: 44px;
    display: none;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    display: block;
    margin: 3px 0;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--neutral-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 900ms ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide > img,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.28), transparent 30%),
        linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    inset: auto 0 0;
    padding: 56px 0 72px;
}

.hero-copy {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 760px;
    color: #ffffff;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--accent-100);
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 760px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

.hero-tags span,
.detail-tags span,
.tag-line span {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13px;
}

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

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

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

.btn.primary {
    background: var(--accent-500);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.32);
}

.btn.primary:hover {
    background: var(--accent-600);
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.btn.ghost.dark {
    color: var(--primary-800);
    background: var(--primary-50);
    border-color: var(--primary-100);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100% - 1280px) / 2));
    bottom: 38px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    cursor: pointer;
}

.hero-dot.active {
    width: 34px;
    background: var(--accent-500);
}

.page-stack {
    padding: 56px 0;
    display: grid;
    gap: 64px;
}

.search-section {
    margin-top: -82px;
    position: relative;
    z-index: 5;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(150px, 1fr));
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(2, 132, 199, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--neutral-600);
    font-size: 13px;
    font-weight: 750;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--neutral-200);
    border-radius: 13px;
    padding: 0 13px;
    background: #ffffff;
    color: var(--neutral-900);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

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

.section-head h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.section-head h2 span {
    color: var(--accent-500);
}

.section-head p {
    margin: 8px 0 0;
    color: var(--neutral-600);
}

.section-more {
    flex: 0 0 auto;
    color: var(--primary-700);
    font-weight: 800;
}

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

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

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

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

.card-link {
    display: block;
    height: 100%;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.card-link:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

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

.list-card .card-link {
    display: grid;
    grid-template-columns: 180px 1fr;
}

.list-card .poster-wrap {
    aspect-ratio: 16 / 9;
    height: 100%;
}

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

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

.year-badge,
.play-chip {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
}

.year-badge {
    top: 10px;
    left: 10px;
    padding: 3px 9px;
    background: rgba(0, 0, 0, 0.58);
    font-size: 12px;
}

.play-chip {
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: var(--accent-500);
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.34);
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p {
    margin: 0 0 10px;
    color: var(--neutral-600);
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--primary-700);
    font-size: 13px;
    font-weight: 800;
}

.tag-line {
    margin-top: 10px;
}

.tag-line span {
    background: var(--primary-50);
    color: var(--primary-800);
}

.feature-band,
.info-grid,
.content-card {
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
    padding: 28px;
}

.scroll-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    width: 190px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

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

.category-tile,
.category-card {
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.category-tile {
    min-height: 148px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    background:
        linear-gradient(135deg, rgba(2, 132, 199, 0.93), rgba(245, 158, 11, 0.72)),
        var(--primary-700);
    color: #ffffff;
    transition: transform 0.2s ease;
}

.category-tile:hover,
.category-main:hover {
    transform: translateY(-4px);
}

.category-tile span,
.category-main span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile small,
.category-main p {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
}

.category-card {
    display: grid;
}

.category-main {
    padding: 22px;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
    color: #ffffff;
    transition: transform 0.2s ease;
}

.category-samples {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.category-samples a {
    color: var(--neutral-700);
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.split-block h3 {
    margin: 0 0 16px;
    color: var(--neutral-800);
    font-size: 22px;
}

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

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

.rank-item a {
    display: grid;
    grid-template-columns: 58px 92px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item a:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.rank-num {
    color: var(--accent-600);
    font-size: 26px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 92px;
    height: 124px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-item h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.rank-item p {
    margin: 0 0 8px;
    color: var(--neutral-600);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--neutral-600);
    font-size: 13px;
}

.rank-meta strong {
    color: var(--primary-700);
}

.list-stack {
    display: grid;
    gap: 18px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0;
    background:
        radial-gradient(circle at 82% 18%, rgba(245, 158, 11, 0.28), transparent 30%),
        linear-gradient(135deg, var(--primary-900), var(--primary-600));
    color: #ffffff;
}

.slim-hero {
    padding: 72px 0 92px;
}

.category-hero {
    padding: 86px 0;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: var(--neutral-900);
    color: #ffffff;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.42;
    filter: blur(2px);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.25), transparent 28%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.18));
}

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

.detail-poster {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.42);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.76);
}

.detail-tags span {
    background: rgba(255, 255, 255, 0.15);
}

.detail-stack {
    padding-top: 52px;
}

.player-section {
    scroll-margin-top: 90px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow-soft);
    aspect-ratio: 16 / 9;
}

.player-video,
.player-cover,
.player-cover img,
.player-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-video {
    z-index: 1;
    background: #000000;
}

.player-cover {
    z-index: 2;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #ffffff;
    background: transparent;
}

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

.player-cover img {
    object-fit: cover;
}

.player-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.28));
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: var(--accent-500);
    color: #ffffff;
    font-size: 30px;
    box-shadow: 0 16px 38px rgba(245, 158, 11, 0.4);
}

.content-card {
    background: #ffffff;
}

.content-card h2,
.info-grid h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-card p,
.info-grid p {
    margin: 0;
    color: var(--neutral-700);
    font-size: 17px;
}

.info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 32px;
    background: linear-gradient(135deg, #ffffff, var(--primary-50));
}

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

.info-grid dl div {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 14px;
    border-bottom: 1px solid var(--neutral-200);
    padding-bottom: 10px;
}

.info-grid dt {
    color: var(--neutral-500);
    font-weight: 800;
}

.info-grid dd {
    margin: 0;
    color: var(--neutral-800);
}

.info-actions {
    margin-top: 20px;
}

.filter-card.is-filtered {
    display: none;
}

.filter-empty {
    padding: 26px;
    border-radius: 18px;
    background: #ffffff;
    color: var(--neutral-600);
    box-shadow: var(--shadow-card);
}

.site-footer {
    margin-top: 40px;
    padding: 52px 0 28px;
    background: var(--neutral-900);
    color: var(--neutral-300);
}

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

.footer-grid h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.footer-grid p {
    margin: 12px 0 0;
}

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

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

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--neutral-800);
    color: var(--neutral-500);
    font-size: 14px;
}

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

    .mobile-toggle {
        display: grid;
    }

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

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

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

@media (max-width: 820px) {
    .hero {
        height: 520px;
    }

    .hero-content {
        padding-bottom: 58px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 38px;
    }

    .filter-panel,
    .split-block,
    .small-rank,
    .footer-grid,
    .info-grid,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

    .search-section {
        margin-top: -42px;
    }

    .movie-grid,
    .compact-grid,
    .catalog-grid,
    .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .detail-hero-inner {
        gap: 26px;
    }

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

    .rank-item a {
        grid-template-columns: 44px 76px 1fr;
        gap: 12px;
    }

    .rank-item img {
        width: 76px;
        height: 104px;
    }

    .list-card .card-link {
        grid-template-columns: 128px 1fr;
    }
}

@media (max-width: 560px) {
    .container,
    .nav-wrap,
    .mobile-nav,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 24px, 1280px);
    }

    .brand {
        font-size: 18px;
    }

    .hero {
        height: 500px;
    }

    .hero-copy p,
    .page-hero p,
    .detail-copy p {
        font-size: 16px;
    }

    .hero-dots {
        left: 16px;
        right: auto;
        bottom: 24px;
    }

    .page-stack {
        gap: 46px;
    }

    .section-head {
        display: grid;
        align-items: start;
    }

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

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

    .feature-band,
    .content-card,
    .info-grid {
        padding: 20px;
        border-radius: 22px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body h3 {
        font-size: 15px;
    }

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

    .rank-num {
        text-align: left;
    }

    .rank-item img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

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

    .list-card .poster-wrap {
        aspect-ratio: 16 / 9;
    }

    .info-grid dl div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
