:root {
    --stone-950: #0c0a09;
    --stone-900: #1c1917;
    --stone-800: #292524;
    --stone-700: #44403c;
    --stone-600: #57534e;
    --stone-500: #78716c;
    --stone-200: #e7e5e4;
    --stone-100: #f5f5f4;
    --stone-50: #fafaf9;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --white: #ffffff;
    --shadow: 0 22px 70px rgba(28, 25, 23, 0.14);
    --soft-shadow: 0 10px 35px rgba(28, 25, 23, 0.10);
}

* {
    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(--stone-900);
    background: var(--stone-50);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 10, 9, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--white);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-mark {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
    color: var(--stone-950);
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.34);
}

.logo-text {
    font-size: 18px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
}

.nav-link {
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-400);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    color: var(--white);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

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

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

.mobile-link {
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
}

.hero {
    position: relative;
    height: min(760px, 90vh);
    min-height: 580px;
    overflow: hidden;
    background: var(--stone-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.1) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(12, 10, 9, 0.94) 0%, rgba(28, 25, 23, 0.72) 42%, rgba(12, 10, 9, 0.2) 100%), linear-gradient(0deg, rgba(12, 10, 9, 0.96) 0%, rgba(12, 10, 9, 0.05) 45%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 78px;
    width: min(720px, calc(100% - 48px));
    color: var(--white);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--amber-500);
    color: var(--stone-950);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.04em;
}

.eyebrow.dark {
    background: rgba(245, 158, 11, 0.12);
    color: var(--amber-600);
}

.hero h1,
.hero h2 {
    margin: 18px 0 0;
    font-size: clamp(28px, 4vw, 60px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.055em;
}

.hero-title {
    color: var(--amber-400);
}

.hero-desc {
    margin: 22px 0 0;
    max-width: 660px;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(16px, 1.55vw, 20px);
    line-height: 1.8;
}

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

.hero-meta span,
.card-meta span,
.card-meta a,
.detail-meta span,
.detail-meta a,
.side-card span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.84);
    padding: 7px 12px;
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 30px 0 0;
}

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

.primary-btn {
    background: var(--amber-500);
    color: var(--stone-950);
    box-shadow: 0 12px 34px rgba(245, 158, 11, 0.32);
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

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

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

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

.hero-dot.is-active {
    width: 34px;
    border-color: var(--amber-400);
    background: var(--amber-400);
}

.search-band,
.filter-bar {
    background: var(--white);
    border-bottom: 1px solid var(--stone-200);
}

.search-inner,
.filter-bar {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 22px 0;
}

.search-inner h2,
.section-heading h2,
.page-hero h1,
.detail-content h1 {
    margin: 0;
    color: var(--stone-900);
    font-weight: 900;
    letter-spacing: -0.045em;
}

.search-inner h2,
.section-heading h2 {
    font-size: clamp(26px, 3vw, 40px);
}

.search-inner p,
.page-hero p,
.category-panel p,
.category-tile p,
.footer-brand p {
    margin: 8px 0 0;
    color: var(--stone-600);
    line-height: 1.75;
}

.search-box,
.filter-bar {
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    gap: 12px;
    min-width: min(480px, 100%);
}

.search-box input,
.search-box select,
.filter-bar input,
.filter-bar select {
    min-height: 46px;
    border: 1px solid var(--stone-200);
    border-radius: 14px;
    background: var(--stone-50);
    padding: 0 15px;
    color: var(--stone-800);
    outline: none;
}

.search-box input,
.filter-bar input {
    flex: 1 1 260px;
}

.search-box input:focus,
.search-box select:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

.section-block.no-top {
    padding-top: 38px;
}

.soft-block {
    width: 100%;
    max-width: none;
    padding: 72px max(16px, calc((100vw - 1180px) / 2));
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(231, 229, 228, 0.48));
}

.dark-block {
    width: 100%;
    max-width: none;
    padding: 72px max(16px, calc((100vw - 1180px) / 2));
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 35%), var(--stone-950);
}

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

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

.section-heading.inverse h2,
.section-heading.inverse a {
    color: var(--white);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--stone-800), var(--stone-950));
}

.compact .poster-link {
    aspect-ratio: 3 / 4;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(12, 10, 9, 0.54), rgba(12, 10, 9, 0.02));
}

.play-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
}

.play-pill {
    left: 14px;
    bottom: 14px;
    padding: 8px 12px;
    background: var(--amber-500);
    color: var(--stone-950);
}

.rank-badge {
    top: 14px;
    left: 14px;
    padding: 7px 10px;
    background: rgba(12, 10, 9, 0.78);
    color: var(--amber-400);
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    color: var(--stone-900);
    font-weight: 900;
    line-height: 1.35;
}

.compact .card-title {
    min-height: 44px;
}

.card-title:hover {
    color: var(--amber-600);
}

.card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    margin: 10px 0 0;
    color: var(--stone-600);
    font-size: 14px;
    line-height: 1.6;
}

.card-meta,
.detail-meta,
.side-card {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.card-meta span,
.card-meta a,
.detail-meta span,
.detail-meta a,
.side-card span {
    background: var(--stone-100);
    color: var(--stone-600);
}

.card-meta a,
.detail-meta a {
    color: var(--amber-600);
    font-weight: 800;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags a {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.10);
    color: var(--amber-600);
    font-size: 12px;
    font-weight: 800;
}

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

.category-tile,
.category-panel {
    border: 1px solid var(--stone-200);
    border-radius: 22px;
    background: var(--white);
    padding: 22px;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-panel:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.55);
}

.category-tile span,
.category-panel-title {
    color: var(--stone-900);
    font-size: 22px;
    font-weight: 900;
}

.page-hero {
    position: relative;
    padding: 86px max(16px, calc((100vw - 1180px) / 2));
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 32%), linear-gradient(135deg, var(--stone-950), var(--stone-800));
    color: var(--white);
}

.page-hero h1 {
    margin-top: 18px;
    max-width: 850px;
    color: var(--white);
    font-size: clamp(34px, 5vw, 64px);
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 18px;
}

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

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.mini-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--stone-100);
    color: var(--stone-700);
    font-size: 13px;
    font-weight: 800;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--stone-500);
    font-size: 14px;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--amber-600);
    font-weight: 800;
}

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

.player-panel,
.detail-side,
.detail-content {
    border-radius: 26px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 26px;
    background: var(--stone-950);
}

.player-video {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--stone-950);
}

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.24), rgba(12, 10, 9, 0.74));
    color: var(--white);
    cursor: pointer;
    text-align: center;
    padding: 22px;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.big-play {
    display: inline-flex;
    width: 76px;
    height: 76px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--amber-500);
    color: var(--stone-950);
    font-size: 30px;
    box-shadow: 0 18px 50px rgba(245, 158, 11, 0.34);
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px 26px 0 0;
    background: linear-gradient(135deg, var(--stone-800), var(--stone-950));
}

.side-card {
    padding: 18px;
}

.detail-content {
    margin-top: 24px;
    padding: clamp(24px, 4vw, 42px);
}

.detail-content h1 {
    margin-top: 18px;
    font-size: clamp(32px, 5vw, 58px);
}

.detail-content .lead {
    margin: 18px 0 0;
    color: var(--stone-700);
    font-size: 20px;
    line-height: 1.75;
}

.detail-content h2 {
    margin: 34px 0 12px;
    color: var(--stone-900);
    font-size: 26px;
    font-weight: 900;
}

.detail-content p {
    color: var(--stone-700);
    line-height: 2;
}

.related-block {
    padding-top: 48px;
}

.site-footer {
    margin-top: 56px;
    background: var(--stone-950);
    color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 36px;
}

.footer-logo {
    color: var(--white);
}

.footer-brand p {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.62);
}

.footer-links h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.footer-link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-link-grid a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    padding: 18px;
    color: rgba(255, 255, 255, 0.52);
}

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

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

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

    .detail-side {
        display: none;
    }
}

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

    .menu-button {
        display: flex;
    }

    .hero {
        min-height: 660px;
    }

    .hero-content {
        bottom: 110px;
    }

    .hero-dots {
        left: max(24px, calc((100vw - 1180px) / 2));
        right: auto;
        bottom: 54px;
    }

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

    .search-box {
        min-width: 100%;
    }

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

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

    .logo-text {
        font-size: 16px;
    }

    .hero h1,
    .hero h2 {
        font-size: 34px;
    }

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

    .section-block,
    .soft-block,
    .dark-block {
        padding-top: 48px;
        padding-bottom: 48px;
    }
}
