:root {
    --primary-50: #fdf8f3;
    --primary-500: #d4884b;
    --primary-600: #c6703f;
    --accent-500: #ed7516;
    --secondary-900: #1c1917;
    --secondary-800: #292524;
    --secondary-700: #44403c;
    --warm-50: #faf9f7;
    --warm-100: #f4f0ea;
    --warm-200: #e8e4dc;
    --warm-300: #d9d3c7;
    --warm-800: #6a5f54;
    --white: #ffffff;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    --shadow-deep: 0 24px 80px rgba(0, 0, 0, 0.22);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--warm-50);
    color: var(--secondary-900);
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
    line-height: 1.6;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(217, 211, 199, 0.65);
}

.nav-shell {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-900);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--white);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: var(--shadow-soft);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--secondary-700);
    font-size: 15px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
    color: var(--secondary-900);
    background: var(--primary-50);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--primary-50);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--secondary-900);
}

.hero {
    position: relative;
    height: 600px;
    min-height: 72vh;
    overflow: hidden;
    background: var(--secondary-900);
}

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

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

.hero-slide > img,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
}

.hero-slide::before,
.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 25%, rgba(212, 136, 75, 0.45), transparent 32%),
        linear-gradient(90deg, rgba(28, 25, 23, 0.94), rgba(28, 25, 23, 0.72) 48%, rgba(28, 25, 23, 0.18));
    z-index: 1;
}

.hero-overlay,
.detail-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(0deg, rgba(28, 25, 23, 0.96), rgba(28, 25, 23, 0.2) 55%, rgba(28, 25, 23, 0.48));
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: end;
    gap: 46px;
    padding-bottom: 82px;
}

.hero-copy {
    max-width: 720px;
    color: var(--white);
    animation: slideUp 0.6s ease both;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    color: var(--primary-500);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 760px;
    margin: 0 0 28px;
    color: var(--warm-200);
    font-size: 18px;
}

.hero-actions,
.detail-copy .btn {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 16px 34px rgba(237, 117, 22, 0.25);
}

.btn.ghost {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.btn.small {
    min-height: 38px;
    padding: 0 14px;
    background: var(--primary-500);
    color: var(--white);
}

.hero-poster,
.detail-poster,
.rank-cover,
.poster-link,
.category-tile {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary-800), var(--primary-600));
}

.hero-poster {
    width: 300px;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    box-shadow: var(--shadow-deep);
    transform: rotate(2deg);
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.rank-cover img,
.category-tile img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 30px;
    font-weight: 900;
    text-align: center;
    letter-spacing: 0.05em;
    background:
        radial-gradient(circle at 35% 15%, rgba(255, 255, 255, 0.22), transparent 28%),
        linear-gradient(135deg, var(--secondary-800), var(--primary-600));
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.48);
    font-size: 34px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

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

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

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 28px;
    background: var(--primary-500);
}

.stats-strip {
    margin-top: -42px;
    position: relative;
    z-index: 7;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-deep);
    backdrop-filter: blur(18px);
}

.stats-grid div {
    padding: 24px;
    border-right: 1px solid var(--warm-200);
    text-align: center;
}

.stats-grid div:last-child {
    border-right: 0;
}

.stats-grid strong {
    display: block;
    color: var(--primary-600);
    font-size: 32px;
    line-height: 1;
}

.stats-grid span {
    color: var(--warm-800);
    font-size: 14px;
}

.content-section {
    padding: 56px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--warm-800);
}

.text-link {
    color: var(--primary-600);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(217, 211, 199, 0.8);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    display: block;
    aspect-ratio: 3 / 4;
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: 45% 0 0;
    z-index: 3;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.type-chip,
.rank-badge {
    position: absolute;
    z-index: 4;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.58);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.rank-badge {
    left: 12px;
    right: auto;
    background: var(--primary-500);
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
}

.movie-info p {
    min-height: 48px;
    margin: 10px 0 12px;
    color: var(--secondary-700);
    font-size: 14px;
}

.movie-meta,
.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.movie-meta span {
    color: var(--warm-800);
    font-size: 13px;
}

.tag-row span,
.detail-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--primary-600);
    background: var(--primary-50);
    font-size: 12px;
    font-weight: 700;
}

.page-hero {
    padding: 86px 0;
    color: var(--white);
    background:
        radial-gradient(circle at 15% 20%, rgba(237, 117, 22, 0.32), transparent 26%),
        linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
}

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

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

.category-tile {
    min-height: 260px;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.category-shade {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(0deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.1));
}

.category-body {
    position: absolute;
    inset: auto 0 0;
    z-index: 4;
    padding: 22px;
    color: var(--white);
}

.category-body strong,
.category-body em,
.category-body small {
    display: block;
}

.category-body strong {
    font-size: 23px;
    font-style: normal;
}

.category-body em {
    color: var(--primary-500);
    font-style: normal;
    font-weight: 800;
}

.category-body small {
    margin-top: 8px;
    color: var(--warm-200);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 190px auto;
    align-items: end;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--warm-200);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.filter-panel.wide {
    grid-template-columns: minmax(240px, 1fr) 180px 160px 190px auto;
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--warm-800);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--warm-200);
    border-radius: 12px;
    background: var(--warm-50);
    color: var(--secondary-900);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(212, 136, 75, 0.14);
}

.filter-count {
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--white);
    background: var(--secondary-900);
    font-weight: 800;
    text-align: center;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--warm-200);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    font-size: 20px;
    font-weight: 900;
}

.rank-cover {
    width: 96px;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--secondary-700);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    background: var(--secondary-900);
}

.detail-hero-inner {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: end;
    gap: 42px;
    min-height: 560px;
    padding: 72px 0;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    box-shadow: var(--shadow-deep);
}

.detail-copy {
    color: var(--white);
}

.detail-tags {
    margin: 0 0 24px;
}

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

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

.player-card,
.text-card,
.side-card {
    overflow: hidden;
    border: 1px solid var(--warm-200);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.player-box {
    position: relative;
    overflow: hidden;
    background: #000000;
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle at center, rgba(212, 136, 75, 0.36), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 18px 48px rgba(237, 117, 22, 0.35);
    font-size: 28px;
}

.play-cover strong {
    font-size: 22px;
}

.play-cover em {
    color: var(--warm-200);
    font-style: normal;
}

.player-message {
    position: absolute;
    inset: auto 16px 16px;
    z-index: 5;
    display: none;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.72);
}

.player-message:not(:empty) {
    display: block;
}

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

.text-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.text-card p {
    margin: 0;
    color: var(--secondary-700);
    font-size: 16px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0;
}

.side-card dt {
    color: var(--warm-800);
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: var(--secondary-800);
}

.site-footer {
    margin-top: 32px;
    padding: 48px 0 22px;
    color: var(--warm-200);
    background: var(--secondary-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 36px;
}

.site-footer p {
    max-width: 440px;
    color: var(--warm-300);
}

.site-footer h3 {
    margin: 0 0 12px;
    color: var(--white);
}

.site-footer a {
    display: block;
    margin: 7px 0;
    color: var(--warm-300);
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tags a {
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--warm-300);
    font-size: 14px;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .filter-panel,
    .filter-panel.wide,
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nav-shell {
        height: 64px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--warm-200);
        border-radius: 18px;
        background: var(--white);
        box-shadow: var(--shadow-deep);
    }

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

    .hero {
        height: 620px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-bottom: 84px;
    }

    .hero-poster {
        display: none;
    }

    .hero-arrow {
        display: none;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid div:nth-child(2) {
        border-right: 0;
    }

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

    .section-heading,
    .section-heading.with-link {
        display: block;
    }

    .movie-info {
        padding: 12px;
    }

    .movie-info h3 {
        font-size: 16px;
    }

    .movie-info p {
        min-height: auto;
        font-size: 13px;
    }

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

    .category-tile {
        min-height: 220px;
    }

    .rank-row {
        grid-template-columns: 40px 72px minmax(0, 1fr);
    }

    .rank-row .btn {
        grid-column: 2 / 4;
    }

    .rank-cover {
        width: 72px;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 48px 0;
    }

    .detail-poster {
        width: 180px;
    }

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