:root {
    color-scheme: light;
    --bg: #f7f3ec;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --text: #1c1917;
    --muted: #78716c;
    --line: rgba(120, 113, 108, 0.22);
    --amber: #d97706;
    --amber-strong: #f59e0b;
    --orange: #ea580c;
    --stone: #292524;
    --shadow: 0 20px 60px rgba(41, 37, 36, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem), var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(28, 25, 23, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: grid;
    grid-template-columns: auto 1fr minmax(240px, 320px);
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff7ed;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.38);
}

.brand-text {
    white-space: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.76);
    padding: 10px 13px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: #fff;
    background: rgba(245, 158, 11, 0.18);
    transform: translateY(-1px);
}

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

.site-search-form {
    position: relative;
}

.site-search-form input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid rgba(245, 158, 11, 0.28);
    outline: 0;
    border-radius: 999px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
}

.site-search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, 90vw);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 8px;
    display: none;
    max-height: 420px;
    overflow: auto;
}

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

.search-result-item {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
}

.search-result-item:hover {
    background: var(--surface-soft);
}

.search-result-item strong {
    display: block;
    color: var(--text);
}

.search-result-item span {
    color: var(--muted);
    font-size: 13px;
}

.hero-carousel {
    position: relative;
    min-height: 74vh;
    overflow: hidden;
    background: #1c1917;
}

.hero-slider {
    position: relative;
    min-height: 74vh;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
    background-image: linear-gradient(90deg, rgba(28, 25, 23, 0.95), rgba(28, 25, 23, 0.58), rgba(28, 25, 23, 0.18)), var(--hero-image);
    background-position: center;
    background-size: cover;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 28% 42%, rgba(245, 158, 11, 0.28), transparent 28rem), linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 50%);
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 760px;
    color: #fff;
    padding: 96px 0 148px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero-kicker span {
    padding: 7px 12px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(245, 158, 11, 0.16);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.hero-content h1,
.hero-content h2 {
    margin: 20px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(16px, 2vw, 21px);
}

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

.hero-meta span,
.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

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

.badge,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags .badge {
    color: #fde68a;
    background: rgba(255, 255, 255, 0.12);
}

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

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 30px rgba(217, 119, 6, 0.34);
}

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

.btn-line {
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
}

.hero-dot.is-active {
    width: 36px;
    background: #f59e0b;
}

.hero-rail {
    position: absolute;
    left: 50%;
    bottom: 22px;
    z-index: 4;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

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

.intro-band,
.category-panel,
.content-card,
.player-shell,
.rank-panel,
.category-card-large {
    border: 1px solid rgba(245, 158, 11, 0.18);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.intro-band {
    margin-top: 42px;
    padding: 34px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.intro-band h2,
.section-heading h2,
.rank-panel h2,
.content-card h2 {
    margin: 6px 0 0;
    color: var(--stone);
    line-height: 1.16;
}

.intro-band p:not(.section-kicker) {
    margin: 10px 0 0;
    color: var(--muted);
}

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

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

.section-heading.compact {
    margin-bottom: 18px;
}

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

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

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(120, 113, 108, 0.16);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(41, 37, 36, 0.09);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(217, 119, 6, 0.42);
    box-shadow: 0 24px 54px rgba(41, 37, 36, 0.17);
}

.hero-rail .movie-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    border-color: rgba(255, 255, 255, 0.16);
}

.hero-rail .card-body h3 a,
.hero-rail .card-meta,
.hero-rail .card-desc {
    color: #fff;
}

.poster-frame,
.detail-poster,
.category-card-large {
    position: relative;
    display: block;
    min-height: 260px;
    overflow: hidden;
    background-image: linear-gradient(160deg, rgba(41, 37, 36, 0.32), rgba(120, 53, 15, 0.72)), var(--poster-image);
    background-position: center;
    background-size: cover;
}

.hero-rail .poster-frame {
    min-height: 128px;
    border-radius: 18px;
}

.poster-frame::after,
.detail-poster::after,
.category-card-large::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 56%);
}

.poster-rating,
.poster-type,
.rank-no {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.poster-rating {
    top: 12px;
    right: 12px;
    padding: 6px 9px;
    color: #1c1917;
    background: #fbbf24;
}

.poster-type {
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
}

.rank-no {
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.card-body h3 a:hover {
    color: var(--amber);
}

.card-meta {
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
}

.card-desc {
    margin: 0 0 12px;
    color: #57534e;
    font-size: 14px;
}

.category-panel {
    padding: 34px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.95), rgba(255, 237, 213, 0.88));
}

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

.category-tile {
    display: flex;
    flex-direction: column;
    min-height: 130px;
    padding: 20px;
    border: 1px solid rgba(217, 119, 6, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    transition: transform 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    background: #fff;
}

.category-tile span {
    color: var(--stone);
    font-size: 20px;
    font-weight: 900;
}

.category-tile em {
    margin-top: 8px;
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 94px;
    padding: 24px;
    border-radius: var(--radius);
}

.rank-panel.large {
    position: static;
}

.rank-list {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.rank-item {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 247, 237, 0.85);
}

.rank-item:hover {
    background: #fff;
}

.rank-item span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    font-weight: 900;
    background: var(--stone);
}

.rank-item strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-item em {
    color: var(--amber);
    font-style: normal;
    font-weight: 900;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #1c1917, #78350f);
}

.page-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 88px 0;
}

.page-hero h1 {
    margin: 10px 0 14px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 220px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 12px 34px rgba(41, 37, 36, 0.08);
}

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

.category-card-large {
    min-height: 250px;
    border-radius: var(--radius);
}

.category-card-large > div {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2;
    color: #fff;
}

.category-card-large p {
    margin: 0 0 6px;
    color: #fbbf24;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.category-card-large h2 {
    margin: 0;
    font-size: 30px;
}

.category-card-large em {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-style: normal;
}

.detail-hero {
    background-image: linear-gradient(90deg, rgba(28, 25, 23, 0.98), rgba(28, 25, 23, 0.72), rgba(28, 25, 23, 0.28)), var(--hero-image);
    background-position: center;
    background-size: cover;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 28% 42%, rgba(245, 158, 11, 0.3), transparent 28rem), linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 56%);
}

.detail-inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0 68px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    min-height: 440px;
    border-radius: 26px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.detail-copy h1 {
    margin: 8px 0 18px;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.04em;
}

.detail-copy p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
}

.player-section {
    padding-bottom: 20px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
}

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

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 18px;
    color: #fff;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.22), rgba(0, 0, 0, 0.52));
}

.player-layer.is-hidden {
    display: none;
}

.player-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 20px 44px rgba(217, 119, 6, 0.36);
    font-size: 30px;
}

.player-layer strong {
    font-size: 24px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.content-card {
    padding: 34px;
    border-radius: var(--radius);
}

.content-card h2 {
    margin-top: 0;
    margin-bottom: 12px;
}

.content-card p {
    margin: 0 0 28px;
    color: #44403c;
    font-size: 17px;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 22px;
}

.info-list div {
    padding: 14px;
    border-radius: 16px;
    background: var(--surface-soft);
}

.info-list dt {
    color: var(--muted);
    font-size: 13px;
}

.info-list dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.tag-row.large span {
    min-height: 34px;
    padding-inline: 14px;
}

.site-footer {
    margin-top: 40px;
    padding: 44px 0;
    color: rgba(255, 255, 255, 0.72);
    background: #1c1917;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
}

.footer-inner strong {
    color: #fff;
    font-size: 22px;
}

.footer-inner p {
    margin: 8px 0 0;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

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

.footer-inner nav a:hover {
    color: #fff;
    background: rgba(245, 158, 11, 0.22);
}

@media (max-width: 1080px) {
    .header-inner {
        grid-template-columns: auto auto 1fr;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .site-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: rgba(28, 25, 23, 0.96);
        box-shadow: var(--shadow);
    }

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

    .site-nav a {
        text-align: center;
    }

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

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

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

    .rank-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        width: min(100% - 22px, 1180px);
        grid-template-columns: 1fr auto;
        gap: 12px;
    }

    .site-search-form {
        grid-column: 1 / -1;
        order: 3;
        margin-bottom: 12px;
    }

    .hero-carousel,
    .hero-slider {
        min-height: 760px;
    }

    .hero-content {
        padding: 78px 0 320px;
    }

    .hero-rail {
        grid-template-columns: 1fr;
        bottom: 18px;
    }

    .hero-rail .movie-card:nth-child(n+3) {
        display: none;
    }

    .hero-dots {
        bottom: 286px;
    }

    .intro-band {
        align-items: flex-start;
        flex-direction: column;
        padding: 24px;
    }

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

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

    .poster-frame {
        min-height: 220px;
    }

    .card-body {
        padding: 13px;
    }

    .card-body h3 {
        font-size: 16px;
    }

    .card-desc {
        display: none;
    }

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

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

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

    .detail-poster {
        min-height: 360px;
        max-width: 280px;
    }

    .info-list {
        grid-template-columns: 1fr;
    }

    .footer-inner nav {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .movie-grid.tight,
    .movie-grid.category-list,
    .movie-grid.wide,
    .category-grid,
    .category-large-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1,
    .hero-content h2,
    .detail-copy h1 {
        letter-spacing: -0.03em;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
