:root {
    --primary-50: #fef7ed;
    --primary-100: #fdecd0;
    --primary-500: #f17925;
    --primary-600: #e2591b;
    --primary-700: #b74312;
    --accent-50: #fef4ee;
    --accent-500: #f04f1f;
    --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-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(231, 229, 228, 0.85);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    width: min(100% - 32px, 1280px);
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
    background: linear-gradient(90deg, var(--primary-600), var(--accent-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--primary-500);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 10px 24px rgba(241, 121, 37, 0.35);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.nav-link {
    color: var(--neutral-700);
    font-weight: 700;
    transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--primary-600);
}

.top-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.search-page-form input,
.local-filter {
    width: 260px;
    border: 1px solid var(--neutral-300);
    border-radius: 999px;
    padding: 10px 16px;
    outline: none;
    background: #fff;
    color: var(--neutral-900);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.search-page-form input:focus,
.local-filter:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(241, 121, 37, 0.16);
}

.top-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #fff;
    background: var(--primary-500);
    cursor: pointer;
    transition: background 0.25s ease;
}

.top-search button:hover {
    background: var(--primary-600);
}

.menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--neutral-700);
    font-size: 28px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    padding: 16px 0 20px;
    border-top: 1px solid var(--neutral-200);
}

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

.mobile-cat-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--neutral-600);
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #000;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.05));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(100% - 32px, 1280px);
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.hero-content h1 {
    max-width: 760px;
    margin: 18px 0 16px;
    font-size: clamp(40px, 7vw, 74px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 34px;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(18px, 2.2vw, 23px);
}

.hero-tags,
.badge-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.badge,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.badge-primary {
    background: var(--primary-500);
    color: #fff;
}

.badge-soft {
    background: var(--primary-100);
    color: var(--primary-700);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

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

.btn-primary {
    color: #fff;
    background: var(--primary-500);
    box-shadow: 0 18px 30px rgba(241, 121, 37, 0.3);
}

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

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.btn-soft {
    color: var(--primary-700);
    background: var(--primary-100);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.06);
}

.hero-prev {
    left: 24px;
    transform: translateY(-50%);
}

.hero-next {
    right: 24px;
    transform: translateY(-50%);
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: #fff;
}

.content-section {
    margin-top: 52px;
}

.content-section.container,
.detail-wrap.container {
    margin-top: 52px;
}

.intro-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
    box-shadow: var(--shadow-xl);
}

.intro-band h2,
.section-head h2,
.side-card h2,
.detail-card h2 {
    margin: 0;
    color: var(--neutral-900);
}

.intro-band p,
.section-head p,
.page-hero p {
    margin: 8px 0 0;
    color: var(--neutral-600);
}

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

.section-head h2 {
    font-size: clamp(26px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.more-link {
    color: var(--primary-600);
    font-weight: 800;
    white-space: nowrap;
}

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

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

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--neutral-200);
}

.poster-wide {
    aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.18), transparent);
}

.year-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 8px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.rank-mark {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--primary-500);
    color: #fff;
    font-weight: 900;
    box-shadow: var(--shadow-lg);
}

.card-body {
    display: block;
    padding: 16px;
}

.card-body strong,
.card-layer strong {
    display: block;
    margin: 9px 0 8px;
    color: var(--neutral-900);
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    display: -webkit-box;
    color: var(--neutral-600);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--neutral-500);
    font-size: 13px;
}

.card-layer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    padding: 24px;
    color: #fff;
}

.card-layer strong,
.card-layer .card-desc {
    color: #fff;
}

.highlight-panel {
    padding: 32px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
    box-shadow: var(--shadow-xl);
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 240px;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

.feature-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 24px;
}

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

.category-card {
    display: block;
    min-height: 142px;
    padding: 24px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-2xl);
}

.category-card span {
    display: block;
    color: var(--neutral-900);
    font-size: 22px;
    font-weight: 900;
}

.category-card em,
.category-overview-card em {
    display: block;
    margin-top: 10px;
    color: var(--neutral-600);
    font-style: normal;
    font-size: 14px;
}

.category-overview-card {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    box-shadow: var(--shadow-xl);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-overview-card img,
.overview-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.category-overview-card img {
    object-fit: cover;
}

.overview-layer {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18));
}

.category-overview-card strong,
.category-overview-card em,
.overview-chips {
    position: relative;
    z-index: 2;
    display: block;
    margin: 0 20px;
}

.category-overview-card strong {
    margin-top: 132px;
    font-size: 26px;
}

.category-overview-card em {
    color: rgba(255, 255, 255, 0.78);
}

.overview-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.overview-chips span {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
}

.page-hero {
    padding: 54px 0;
    color: #fff;
    background: linear-gradient(90deg, var(--primary-600), var(--accent-500));
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

.detail-wrap .breadcrumb {
    color: var(--neutral-600);
}

.breadcrumb a:hover {
    color: var(--primary-600);
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

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

.hidden-by-filter {
    display: none !important;
}

.search-page-form {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.search-page-form input {
    width: min(100%, 560px);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
    gap: 32px;
}

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

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow-2xl);
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.play-panel {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.1));
    cursor: pointer;
}

.play-panel.is-hidden {
    display: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--primary-500);
    font-size: 30px;
    box-shadow: 0 20px 50px rgba(241, 121, 37, 0.4);
}

.detail-card,
.side-card {
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.detail-card {
    padding: 28px;
}

.detail-top {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.detail-top img {
    width: 190px;
    border-radius: 18px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

.detail-tags .badge {
    background: var(--primary-100);
    color: var(--primary-700);
}

.detail-card h1 {
    margin: 16px 0 12px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.lead-text {
    margin: 0 0 18px;
    color: var(--neutral-700);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--neutral-600);
}

.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    background: var(--neutral-100);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.tag {
    background: var(--neutral-100);
    color: var(--neutral-700);
}

.detail-card p {
    color: var(--neutral-700);
    font-size: 16px;
}

.side-card {
    position: sticky;
    top: 90px;
    padding: 22px;
}

.side-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.side-link {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.side-link:hover {
    background: var(--neutral-100);
}

.side-link img {
    width: 82px;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    object-fit: cover;
}

.side-link strong {
    display: -webkit-box;
    color: var(--neutral-900);
    font-size: 15px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-link em {
    display: block;
    margin-top: 8px;
    color: var(--neutral-500);
    font-style: normal;
    font-size: 13px;
}

.site-footer {
    margin-top: 72px;
    background: var(--neutral-900);
    color: var(--neutral-300);
}

.footer-inner {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding: 46px 0;
}

.footer-logo {
    color: #fff;
    -webkit-background-clip: initial;
    background-clip: initial;
    background: none;
}

.footer-brand p {
    max-width: 560px;
    color: var(--neutral-300);
}

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

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

.footer-links a:hover {
    color: var(--primary-500);
}

.footer-bottom {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    padding: 20px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--neutral-500);
}

@media (max-width: 1120px) {
    .top-search {
        display: none;
    }

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

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

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

    .side-card {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

    .header-inner {
        gap: 12px;
    }

    .site-logo {
        font-size: 20px;
    }

    .hero {
        min-height: 560px;
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 88px;
    }

    .hero-arrow {
        display: none;
    }

    .intro-band,
    .section-head,
    .filter-panel,
    .search-page-form {
        align-items: stretch;
        flex-direction: column;
    }

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

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

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

    .detail-top img {
        width: min(220px, 100%);
    }
}

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

    .hero {
        height: 78vh;
        min-height: 560px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-content p {
        font-size: 17px;
    }

    .movie-grid,
    .catalog-grid,
    .compact-grid,
    .recommended-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .highlight-panel,
    .intro-band,
    .detail-card {
        padding: 20px;
    }

    .scroll-row {
        grid-auto-columns: 78vw;
    }
}
