* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --page-bg: #fff7ed;
    --panel-bg: #ffffff;
    --panel-soft: #fffbeb;
    --text-main: #431407;
    --text-muted: #92400e;
    --text-soft: #b45309;
    --brand: #d97706;
    --brand-dark: #92400e;
    --brand-bright: #f59e0b;
    --line: rgba(180, 83, 9, 0.22);
    --shadow: 0 22px 55px rgba(146, 64, 14, 0.15);
    --shadow-strong: 0 30px 80px rgba(120, 53, 15, 0.28);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --container: 1180px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 12% 0%, rgba(251, 191, 36, 0.22), transparent 30%),
        radial-gradient(circle at 88% 12%, rgba(249, 115, 22, 0.16), transparent 28%),
        linear-gradient(180deg, #fff7ed 0%, #fffbeb 52%, #fff7ed 100%);
}

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: 100;
    background: rgba(255, 247, 237, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 28px rgba(146, 64, 14, 0.08);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #d97706, #9a3412);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(217, 119, 6, 0.32);
}

.brand-text {
    font-size: 1.25rem;
}

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

.nav-link,
.mobile-nav-link {
    padding: 10px 16px;
    color: #78350f;
    border-radius: 14px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: #7c2d12;
    background: rgba(251, 191, 36, 0.22);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: rgba(251, 191, 36, 0.18);
    border-radius: 14px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #78350f;
    border-radius: 10px;
}

.mobile-nav {
    display: none;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    border-radius: 18px;
}

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

.hero-slider {
    position: relative;
    width: min(1360px, calc(100% - 32px));
    min-height: 640px;
    margin: 26px auto 0;
    overflow: hidden;
    border-radius: 36px;
    background: #451a03;
    box-shadow: var(--shadow-strong);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 46px;
    padding: 74px min(6vw, 86px);
    background-position: center;
    background-size: cover;
    color: #fff7ed;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-content {
    max-width: 720px;
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #f59e0b;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.08em;
}

.hero-content p,
.page-hero p,
.detail-copy p {
    max-width: 680px;
    margin: 22px 0 0;
    color: rgba(255, 247, 237, 0.88);
    font-size: 1.08rem;
    line-height: 1.9;
}

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

.primary-button,
.ghost-button,
.search-card button,
.inline-filter button,
.search-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-card button,
.inline-filter button,
.search-panel button {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 16px 35px rgba(217, 119, 6, 0.35);
}

.primary-button:hover,
.search-card button:hover,
.inline-filter button:hover,
.search-panel button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(217, 119, 6, 0.45);
}

.ghost-button {
    color: #fff7ed;
    background: rgba(255, 247, 237, 0.16);
    border: 1px solid rgba(255, 247, 237, 0.28);
}

.ghost-button:hover {
    background: rgba(255, 247, 237, 0.24);
    transform: translateY(-2px);
}

.hero-tags {
    margin-top: 20px;
}

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

.tag-row span,
.tag-cloud a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #92400e;
    background: rgba(251, 191, 36, 0.18);
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.hero-tags span,
.detail-tags span {
    color: #fff7ed;
    background: rgba(255, 247, 237, 0.18);
    border-color: rgba(255, 247, 237, 0.24);
}

.hero-poster {
    position: relative;
    z-index: 2;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid rgba(255, 247, 237, 0.26);
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
    transform: rotate(2deg);
}

.hero-poster img,
.movie-card img,
.compact-card img,
.detail-poster img,
.category-tile img,
.category-overview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    right: 34px;
    bottom: 34px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    color: #fff7ed;
    background: rgba(255, 247, 237, 0.18);
    border: 1px solid rgba(255, 247, 237, 0.26);
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.hero-dots {
    position: absolute;
    left: min(6vw, 86px);
    bottom: 44px;
    z-index: 4;
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 26px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 247, 237, 0.32);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 42px;
    background: #f59e0b;
}

.search-band,
.section-block,
.page-hero,
.breadcrumb-bar,
.detail-layout {
    width: min(var(--container), calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.search-band {
    margin-top: -42px;
    position: relative;
    z-index: 5;
}

.search-card {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
    align-items: center;
    gap: 24px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-card h2,
.section-heading h2,
.page-hero h1,
.content-panel h2,
.side-card h2,
.rank-aside h2 {
    margin: 0;
    letter-spacing: -0.05em;
}

.home-search,
.inline-filter,
.search-panel {
    display: flex;
    gap: 12px;
}

.home-search input,
.inline-filter input,
.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    color: var(--text-main);
    background: #fff7ed;
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-radius: 999px;
    outline: none;
}

.section-block {
    margin-top: 74px;
}

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

.section-heading h2 {
    font-size: clamp(1.8rem, 3vw, 3rem);
}

.section-heading a {
    color: #b45309;
    font-weight: 800;
}

.light-heading {
    color: #fff7ed;
}

.light-heading a {
    color: #fde68a;
}

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

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 172px;
    padding: 18px;
    color: #fff7ed;
    background: #451a03;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.category-tile img {
    position: absolute;
    inset: 0;
    opacity: 0.38;
    filter: saturate(1.1);
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img,
.category-overview-card:hover img {
    opacity: 0.54;
    transform: scale(1.05);
}

.category-tile::after,
.category-overview-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(69, 26, 3, 0.2), rgba(69, 26, 3, 0.9));
}

.category-tile span,
.category-overview-card .category-copy {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 8px;
    height: 100%;
    align-content: end;
}

.category-tile strong,
.category-overview-card strong {
    font-size: 1.2rem;
}

.category-tile em,
.category-overview-card em,
.movie-meta-line,
.movie-desc,
.compact-card em {
    color: rgba(120, 53, 15, 0.72);
    font-style: normal;
    line-height: 1.6;
}

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

.highlight-panel {
    padding: 34px;
    color: #fff7ed;
    background:
        radial-gradient(circle at 12% 10%, rgba(251, 191, 36, 0.35), transparent 30%),
        linear-gradient(135deg, #78350f, #431407);
    border-radius: 34px;
    box-shadow: var(--shadow-strong);
}

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

.movie-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(217, 119, 6, 0.16);
    border-radius: 24px;
    box-shadow: 0 12px 36px rgba(146, 64, 14, 0.10);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(217, 119, 6, 0.38);
    box-shadow: 0 22px 54px rgba(146, 64, 14, 0.20);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #451a03;
}

.poster-wrap img {
    transition: transform 0.35s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(180deg, transparent, rgba(69, 26, 3, 0.76));
}

.movie-card-body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.movie-card-body strong {
    font-size: 1.03rem;
    line-height: 1.35;
}

.movie-meta-line,
.movie-desc {
    display: block;
    font-size: 0.88rem;
}

.rank-number {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    border-radius: 12px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(69, 26, 3, 0.25);
}

.compact-grid,
.compact-stack {
    display: grid;
    gap: 14px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(217, 119, 6, 0.16);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(146, 64, 14, 0.08);
}

.compact-card img {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
}

.compact-card span {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.compact-card strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.compact-rank {
    position: absolute;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #b45309;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 900;
}

.page-hero {
    margin-top: 30px;
    padding: 70px min(6vw, 74px);
    color: #fff7ed;
    background:
        radial-gradient(circle at 16% 10%, rgba(251, 191, 36, 0.36), transparent 26%),
        linear-gradient(135deg, #7c2d12, #451a03);
    border-radius: 34px;
    box-shadow: var(--shadow-strong);
}

.page-hero h1 {
    font-size: clamp(2.4rem, 4vw, 4.8rem);
}

.soft-hero {
    background:
        radial-gradient(circle at 82% 0%, rgba(251, 191, 36, 0.28), transparent 30%),
        linear-gradient(135deg, #92400e, #451a03);
}

.inline-filter,
.search-panel {
    max-width: 820px;
    margin-top: 30px;
}

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

.category-overview-card {
    min-height: 240px;
}

.category-covers {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    opacity: 0.6;
}

.category-covers img {
    height: 100%;
    min-width: 0;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
}

.rank-aside,
.side-card,
.content-panel {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(217, 119, 6, 0.16);
    border-radius: 24px;
    box-shadow: 0 12px 36px rgba(146, 64, 14, 0.08);
}

.rank-aside {
    position: sticky;
    top: 92px;
    align-self: start;
    padding: 20px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px auto;
}

.breadcrumb-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    color: #92400e;
    font-weight: 700;
}

.detail-hero {
    position: relative;
    width: min(1360px, calc(100% - 32px));
    margin: 24px auto 0;
    overflow: hidden;
    border-radius: 34px;
    color: #fff7ed;
    box-shadow: var(--shadow-strong);
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(1.08);
}

.detail-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 62px min(6vw, 78px);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 247, 237, 0.24);
    border-radius: 28px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.32);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    margin-top: 42px;
}

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

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111827;
    border-radius: 28px;
    box-shadow: var(--shadow-strong);
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #111827;
}

.player-cover-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 14px;
    color: #fff7ed;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.18), rgba(69, 26, 3, 0.76));
    border: 0;
    cursor: pointer;
}

.player-cover-layer.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.play-ring {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    padding-left: 5px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    border-radius: 50%;
    box-shadow: 0 18px 48px rgba(217, 119, 6, 0.38);
    font-size: 2rem;
}

.content-panel,
.side-card {
    padding: 24px;
}

.content-panel p {
    color: #6b3b12;
    line-height: 2;
    font-size: 1rem;
}

.detail-aside {
    display: grid;
    align-content: start;
    gap: 22px;
}

.meta-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 18px 0 0;
    list-style: none;
}

.meta-list li {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(217, 119, 6, 0.12);
}

.meta-list span {
    color: #b45309;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.site-footer {
    margin-top: 86px;
    padding: 38px 0;
    background: #451a03;
    color: #fffbeb;
}

.footer-inner {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 30px;
    align-items: center;
}

.footer-inner p {
    max-width: 720px;
    color: rgba(255, 247, 237, 0.72);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.footer-links a {
    color: #fde68a;
}

.is-hidden-card {
    display: none !important;
}

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

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

    .rank-aside {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-slider {
        min-height: 720px;
        border-radius: 26px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 42px 24px 92px;
    }

    .hero-poster {
        max-width: 220px;
        margin: 0 auto;
        transform: none;
    }

    .hero-dots {
        left: 24px;
        bottom: 28px;
    }

    .hero-controls {
        right: 24px;
        bottom: 20px;
    }

    .search-card,
    .detail-content,
    .footer-inner,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .search-band {
        margin-top: 24px;
    }

    .home-search,
    .inline-filter,
    .search-panel {
        display: grid;
        grid-template-columns: 1fr;
    }

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

    .detail-content {
        padding: 38px 24px;
    }

    .detail-poster {
        max-width: 220px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 540px) {
    .header-inner {
        width: min(100% - 22px, var(--container));
    }

    .brand-text {
        font-size: 1.05rem;
    }

    .hero-slider,
    .detail-hero {
        width: calc(100% - 20px);
    }

    .section-block,
    .search-band,
    .page-hero,
    .breadcrumb-bar,
    .detail-layout {
        width: calc(100% - 20px);
    }

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

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

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .highlight-panel,
    .page-hero {
        padding: 28px 18px;
        border-radius: 24px;
    }
}
