:root {
    --stone-950: #0c0a09;
    --stone-900: #1c1917;
    --stone-850: #24201f;
    --stone-800: #292524;
    --stone-700: #44403c;
    --stone-600: #57534e;
    --stone-500: #78716c;
    --stone-400: #a8a29e;
    --stone-300: #d6d3d1;
    --stone-200: #e7e5e4;
    --stone-100: #f5f5f4;
    --stone-50: #fafaf9;
    --bronze-800: #846358;
    --bronze-700: #977669;
    --bronze-600: #a18072;
    --bronze-500: #b39183;
    --bronze-400: #d2bab0;
    --bronze-200: #eaddd7;
    --bronze-100: #f2e8e5;
    --heritage-100: #e4e4e1;
    --heritage-50: #f7f7f6;
    --white: #ffffff;
    --shadow-lg: 0 16px 40px rgba(12, 10, 9, 0.16);
    --shadow-soft: 0 12px 30px rgba(12, 10, 9, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--stone-100);
    background: rgba(28, 25, 23, 0.96);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

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

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: var(--stone-950);
    background: linear-gradient(135deg, var(--bronze-400), var(--bronze-700));
    font-weight: 800;
    box-shadow: 0 0 0 4px rgba(210, 186, 176, 0.12);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: 0.04em;
}

.brand-text small {
    color: var(--stone-400);
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    color: var(--stone-300);
}

.main-nav a,
.mobile-nav a {
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover {
    color: var(--bronze-400);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--stone-200);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 0 24px 20px;
    color: var(--stone-300);
}

.mobile-nav.is-open {
    display: flex;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    color: var(--white);
    background: var(--stone-900);
}

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

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

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

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12, 10, 9, 1), rgba(12, 10, 9, 0.72), rgba(12, 10, 9, 0.10));
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 48px 0 76px;
}

.hero-copy {
    max-width: 760px;
}

.hero-copy .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--bronze-200);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 660px;
    margin: 0 0 28px;
    color: var(--stone-200);
    font-size: clamp(16px, 2vw, 21px);
}

.hero-actions,
.detail-actions,
.search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

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

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

.btn-primary {
    color: var(--white);
    background: var(--bronze-600);
}

.btn-primary:hover {
    background: var(--bronze-700);
}

.btn-ghost {
    color: var(--stone-100);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(12, 10, 9, 0.46);
}

.btn-light {
    color: var(--stone-900);
    background: var(--white);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(12, 10, 9, 0.56);
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(12, 10, 9, 0.80);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--bronze-400);
}

main {
    overflow: hidden;
}

.section-wrap {
    padding: 64px 0;
}

.section-wrap.tight {
    padding-top: 36px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.section-heading > span {
    width: 8px;
    height: 34px;
    border-radius: 999px;
    background: var(--bronze-600);
}

.section-heading h2,
.page-title h1,
.detail-text h2,
.player-info h1 {
    margin: 0;
    color: var(--stone-900);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.2;
}

.section-heading p,
.page-title p {
    margin: 6px 0 0;
    color: var(--stone-500);
}

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

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

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

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 46px rgba(12, 10, 9, 0.18);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--stone-800);
}

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

.movie-card:hover .movie-poster img,
.mini-card:hover img {
    transform: scale(1.08);
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12, 10, 9, 0.82), rgba(12, 10, 9, 0.06));
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.play-chip {
    right: 14px;
    bottom: 14px;
    min-width: 52px;
    height: 28px;
    border-radius: 999px;
    color: var(--stone-950);
    background: var(--bronze-400);
    font-size: 13px;
    font-weight: 800;
}

.rank-badge {
    top: 12px;
    left: 12px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--bronze-600), var(--stone-900));
    font-size: 18px;
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--stone-500);
    font-size: 13px;
}

.movie-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--stone-100);
}

.movie-card h3 {
    display: -webkit-box;
    min-height: 54px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--stone-900);
    font-size: 20px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card h3 a:hover {
    color: var(--bronze-700);
}

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

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

.tag-row span {
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--bronze-800);
    background: var(--bronze-100);
    font-size: 12px;
    font-weight: 700;
}

.heritage-panel {
    margin: 20px 0;
    padding: 42px;
    border-radius: 28px;
    background: var(--heritage-100);
}

.scroller {
    overflow-x: auto;
    padding-bottom: 14px;
}

.scroller-inner {
    display: flex;
    gap: 20px;
    min-width: max-content;
}

.scroller .movie-card {
    width: 280px;
    flex: 0 0 auto;
}

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

.region-column h3 {
    margin: 0 0 16px;
    color: var(--bronze-700);
    font-size: 24px;
}

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

.mini-card {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    color: var(--white);
    background: var(--stone-800);
}

.mini-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mini-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12, 10, 9, 0.88), rgba(12, 10, 9, 0.05));
}

.mini-card span {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: -webkit-box;
    overflow: hidden;
    font-weight: 800;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.search-panel,
.page-hero,
.detail-hero {
    color: var(--stone-100);
    background: linear-gradient(135deg, var(--stone-950), var(--stone-800));
}

.search-panel {
    padding: 42px 0;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    max-width: 780px;
}

.search-box input,
.filter-row input,
.filter-row select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    outline: none;
    color: var(--stone-100);
    background: rgba(255, 255, 255, 0.08);
}

.filter-row input,
.filter-row select {
    color: var(--stone-900);
    border-color: var(--stone-200);
    background: var(--white);
}

.search-box input:focus,
.filter-row input:focus,
.filter-row select:focus {
    border-color: var(--bronze-400);
    box-shadow: 0 0 0 4px rgba(210, 186, 176, 0.22);
}

.page-hero {
    padding: 62px 0;
}

.page-title h1 {
    color: var(--white);
}

.page-title p {
    max-width: 760px;
    color: var(--stone-300);
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    margin: 30px 0;
}

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

.category-card {
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 28px;
    border-radius: 24px;
    color: var(--stone-100);
    background: linear-gradient(135deg, var(--stone-900), var(--bronze-800));
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.category-card p {
    flex: 1;
    margin: 0 0 18px;
    color: var(--stone-200);
}

.category-card span {
    color: var(--bronze-200);
    font-weight: 800;
}

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

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

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
    gap: 30px;
    align-items: start;
}

.player-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--stone-950);
    box-shadow: var(--shadow-lg);
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--stone-950);
}

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    padding: 24px;
    color: var(--white);
    background: linear-gradient(to top, rgba(12, 10, 9, 0.82), rgba(12, 10, 9, 0.18));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-start {
    display: grid;
    gap: 14px;
    place-items: center;
    max-width: 360px;
    text-align: center;
}

.play-button {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border: 0;
    border-radius: 999px;
    color: var(--stone-950);
    background: var(--bronze-400);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.play-button svg {
    width: 34px;
    height: 34px;
    margin-left: 4px;
}

.player-info {
    padding: 4px 0;
}

.player-info h1 {
    color: var(--white);
}

.player-info p {
    color: var(--stone-300);
}

.detail-cover {
    overflow: hidden;
    margin-top: 20px;
    border-radius: 18px;
}

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

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--bronze-200);
    background: rgba(255, 255, 255, 0.08);
    font-weight: 700;
}

.detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    padding: 62px 0;
}

.detail-text {
    display: grid;
    gap: 28px;
}

.detail-block {
    padding: 30px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.detail-block h2 {
    margin-bottom: 16px;
    font-size: 28px;
}

.detail-block p {
    margin: 0 0 14px;
    color: var(--stone-700);
    line-height: 1.85;
}

.side-panel {
    position: sticky;
    top: 96px;
    align-self: start;
    padding: 24px;
    border-radius: 22px;
    background: var(--heritage-100);
}

.side-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.side-links {
    display: grid;
    gap: 14px;
}

.side-link {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
    transition: background 0.2s ease, transform 0.2s ease;
}

.side-link:hover {
    background: var(--white);
    transform: translateX(3px);
}

.side-link img {
    width: 76px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

.side-link strong {
    display: block;
    margin-bottom: 4px;
    color: var(--stone-900);
    line-height: 1.35;
}

.side-link small {
    color: var(--stone-500);
}

.no-results {
    display: none;
    padding: 32px;
    border-radius: 18px;
    color: var(--stone-600);
    background: var(--stone-100);
    text-align: center;
}

.no-results.is-visible {
    display: block;
}

.site-footer {
    color: var(--stone-300);
    background: var(--stone-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--stone-100);
}

.site-footer p {
    max-width: 320px;
    color: var(--stone-400);
}

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

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

.footer-bottom {
    padding: 22px 0;
    border-top: 1px solid var(--stone-800);
    color: var(--stone-500);
    text-align: center;
}

@media (max-width: 1040px) {
    .movie-grid,
    .movie-grid.four,
    .region-layout,
    .player-layout,
    .detail-body,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .side-panel {
        position: static;
    }
}

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

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .hero {
        min-height: 62vh;
    }

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

    .hero-control {
        display: none;
    }

    .section-wrap {
        padding: 44px 0;
    }

    .heritage-panel {
        padding: 24px 14px;
        border-radius: 20px;
    }

    .movie-grid,
    .movie-grid.four,
    .region-layout,
    .category-overview,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .filter-row,
    .search-box {
        grid-template-columns: 1fr;
    }

    .detail-hero,
    .page-hero {
        padding: 38px 0;
    }

    .detail-block {
        padding: 22px;
    }
}

@media (max-width: 520px) {
    .movie-grid {
        gap: 18px;
    }

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

    .scroller .movie-card {
        width: 245px;
    }

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