* {
    box-sizing: border-box;
}

:root {
    --bg: #f5f2ec;
    --paper: #ffffff;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --amber: #d97706;
    --amber-dark: #b45309;
    --amber-soft: #fef3c7;
    --text: #292524;
    --muted: #78716c;
    --radius: 20px;
    --shadow: 0 20px 50px rgba(28, 25, 23, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--stone-50), var(--stone-100));
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #fff;
    background: linear-gradient(90deg, var(--stone-800), var(--stone-700), var(--stone-800));
    box-shadow: 0 8px 30px rgba(28, 25, 23, 0.22);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.35);
}

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

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

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 12px;
    color: var(--stone-200);
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: var(--amber);
    transform: translateY(-1px);
}

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

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: #fff;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.hero-carousel {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    color: #fff;
    background: var(--stone-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.015);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 1.1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 26%, rgba(217, 119, 6, 0.32), transparent 28%),
        linear-gradient(0deg, rgba(28, 25, 23, 0.94), rgba(28, 25, 23, 0.42) 42%, rgba(28, 25, 23, 0.22)),
        linear-gradient(90deg, rgba(28, 25, 23, 0.95), rgba(28, 25, 23, 0.48), rgba(28, 25, 23, 0.3));
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 46px;
    align-items: end;
    min-height: 650px;
    padding: 96px 0 82px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 18px;
    padding: 7px 13px;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    background: var(--amber);
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.28);
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    color: var(--stone-200);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.meta-pills span {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--stone-700);
    font-size: 12px;
    background: var(--amber-soft);
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
}

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

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

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

.btn-primary {
    color: #fff;
    background: var(--amber);
    box-shadow: 0 16px 32px rgba(217, 119, 6, 0.32);
}

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

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-poster {
    display: block;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
    transform: rotate(1.5deg);
}

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

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

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

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

.section {
    padding: 64px 0 0;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: var(--amber-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section h2,
.page-title h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
    color: var(--stone-900);
}

.section-lead,
.page-title p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.search-panel {
    position: relative;
    z-index: 10;
    margin-top: -42px;
}

.search-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(231, 229, 228, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.search-card input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid var(--stone-200);
    border-radius: 14px;
    color: var(--text);
    font-size: 15px;
    outline: none;
    background: #fff;
}

.search-card input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.search-results {
    display: none;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(28, 25, 23, 0.14);
}

.search-results.is-open {
    display: block;
}

.search-result {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--stone-100);
}

.search-result img {
    width: 56px;
    height: 76px;
    object-fit: cover;
    border-radius: 10px;
}

.search-result strong {
    display: block;
    margin-bottom: 5px;
}

.search-result small {
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(231, 229, 228, 0.8);
    border-radius: 22px;
    background: var(--paper);
    box-shadow: 0 14px 36px rgba(28, 25, 23, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(28, 25, 23, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--stone-800);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(28, 25, 23, 0.75), transparent);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-grid;
    min-width: 38px;
    height: 32px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    background: var(--amber);
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.32);
}

.movie-info {
    padding: 16px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 12px;
}

.movie-info h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
    color: var(--stone-900);
}

.movie-info h3 a:hover {
    color: var(--amber-dark);
}

.movie-info p {
    margin: 0 0 12px;
    min-height: 46px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.compact-card .movie-info p {
    min-height: 0;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 176px;
    padding: 22px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--stone-800), var(--stone-700));
    box-shadow: 0 16px 35px rgba(28, 25, 23, 0.13);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -35px;
    bottom: -35px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.35);
}

.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--stone-200);
    font-size: 14px;
    line-height: 1.65;
}

.page-hero {
    padding: 74px 0 52px;
    color: #fff;
    background:
        radial-gradient(circle at 82% 22%, rgba(217, 119, 6, 0.34), transparent 28%),
        linear-gradient(135deg, var(--stone-900), var(--stone-700));
}

.page-title h1 {
    color: #fff;
}

.page-title p {
    color: var(--stone-200);
}

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

.breadcrumb a:hover {
    color: #fff;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 160px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--stone-200);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(28, 25, 23, 0.07);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 74px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--stone-200);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(28, 25, 23, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    box-shadow: 0 18px 36px rgba(28, 25, 23, 0.11);
}

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

.rank-num {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 800;
    background: var(--amber);
}

.rank-text strong {
    display: block;
    color: var(--stone-900);
    font-size: 17px;
}

.rank-text small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.side-panel {
    position: sticky;
    top: 92px;
    padding: 20px;
    border-radius: 24px;
    background: var(--stone-900);
    color: #fff;
    box-shadow: var(--shadow);
}

.side-panel h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 24px;
}

.detail-hero {
    padding: 46px 0 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 30px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: var(--stone-900);
    box-shadow: var(--shadow);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(28, 25, 23, 0.58), rgba(28, 25, 23, 0.16));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    display: inline-grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    font-size: 30px;
    background: var(--amber);
    box-shadow: 0 24px 60px rgba(217, 119, 6, 0.45);
}

.detail-copy {
    padding: 26px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(28, 25, 23, 0.09);
}

.detail-copy h1 {
    margin-bottom: 14px;
}

.detail-copy .lead {
    margin: 16px 0 20px;
    color: var(--stone-600);
    font-size: 17px;
    line-height: 1.8;
}

.detail-cover {
    float: right;
    width: 148px;
    margin: 0 0 16px 18px;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(28, 25, 23, 0.16);
}

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

.article-block {
    padding: 28px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(28, 25, 23, 0.08);
}

.article-block h2 {
    margin: 0 0 14px;
    font-size: 26px;
    color: var(--stone-900);
}

.article-block p {
    margin: 0 0 16px;
    color: var(--stone-600);
    font-size: 16px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 76px;
    color: var(--stone-300);
    background: linear-gradient(180deg, var(--stone-800), var(--stone-900));
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
    gap: 34px;
    padding: 42px 0;
}

.footer-logo {
    color: #fff;
}

.footer-brand p {
    max-width: 520px;
    color: var(--stone-400, #a8a29e);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

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

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--stone-400, #a8a29e);
    font-size: 14px;
}

.empty-state {
    display: none;
    padding: 26px;
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: #fff;
}

.empty-state.is-visible {
    display: block;
}

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

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

    .hero-inner,
    .detail-grid,
    .rank-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

    .side-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel,
    .hero-inner {
        min-height: 590px;
    }

    .hero-inner {
        padding: 78px 0 72px;
    }

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

    .search-card,
    .filter-bar {
        grid-template-columns: 1fr;
    }

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

    .section-header {
        display: block;
    }

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

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .detail-cover {
        float: none;
        width: 132px;
        margin: 0 0 16px;
    }
}

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

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

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

    .brand-text small {
        font-size: 11px;
    }

    .hero-copy h1 {
        font-size: 36px;
    }

    .rank-item {
        grid-template-columns: 44px 64px minmax(0, 1fr);
    }

    .rank-item img {
        width: 64px;
        height: 86px;
    }
}
