:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --panel: #ffffff;
    --panel-strong: #fff1d6;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(146, 64, 14, 0.16);
    --brand: #ea580c;
    --brand-dark: #c2410c;
    --brand-soft: #fed7aa;
    --gold: #f59e0b;
    --shadow: 0 20px 45px rgba(146, 64, 14, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.28), transparent 38%), var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.nav-open {
    overflow: hidden;
}

img {
    max-width: 100%;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
    padding: 0 5vw;
    background: rgba(255, 251, 235, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    color: var(--brand-dark);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.logo-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(234, 88, 12, 0.28);
}

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

.main-nav a {
    padding: 10px 14px;
    color: #7c2d12;
    border-radius: 999px;
    font-weight: 700;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
    background: var(--brand);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(146, 64, 14, 0.08);
}

.header-search input {
    width: 210px;
    min-width: 0;
    padding: 9px 8px 9px 14px;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: 0;
}

.header-search button,
.button-primary,
.button-secondary,
.search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #ea580c);
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(234, 88, 12, 0.25);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-search button:hover,
.button-primary:hover,
.button-secondary:hover,
.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(234, 88, 12, 0.32);
}

.button-secondary {
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid rgba(234, 88, 12, 0.25);
    box-shadow: none;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    padding: 10px 13px;
    color: #9a3412;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-weight: 800;
}

main {
    overflow: hidden;
}

.container {
    width: min(1180px, 90vw);
    margin: 0 auto;
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    color: #fff;
    background: #1c1005;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(28, 16, 5, 0.92), rgba(28, 16, 5, 0.52), rgba(28, 16, 5, 0.1)), linear-gradient(0deg, rgba(28, 16, 5, 0.96), rgba(28, 16, 5, 0.08) 52%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, 90vw);
    margin: 0 auto;
    padding: 130px 0 76px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 42px;
    align-items: end;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 18px;
    padding: 8px 13px;
    color: #ffedd5;
    background: rgba(234, 88, 12, 0.34);
    border: 1px solid rgba(251, 146, 60, 0.35);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.hero-title {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 82px);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.08em;
    text-shadow: 0 14px 44px rgba(0, 0, 0, 0.35);
}

.hero-intro {
    max-width: 680px;
    margin: 0 0 26px;
    color: #ffedd5;
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
}

.hero-meta,
.card-meta,
.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-meta span,
.card-meta span,
.detail-meta span,
.tag-list span,
.tag-list a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #9a3412;
    background: #ffedd5;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-meta span {
    color: #ffedd5;
    background: rgba(255, 237, 213, 0.13);
    border: 1px solid rgba(255, 237, 213, 0.22);
}

.hero-side {
    display: grid;
    gap: 14px;
}

.hero-mini-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    padding: 12px;
    background: rgba(255, 247, 237, 0.14);
    border: 1px solid rgba(255, 237, 213, 0.22);
    border-radius: 18px;
    backdrop-filter: blur(14px);
    transition: transform 0.25s ease, background 0.25s ease;
}

.hero-mini-card:hover {
    background: rgba(255, 247, 237, 0.22);
    transform: translateX(-4px);
}

.hero-mini-card img {
    position: static;
    width: 92px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.hero-mini-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.hero-mini-card span {
    color: #fed7aa;
    font-size: 12px;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    right: 5vw;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 6px;
    background: rgba(255, 255, 255, 0.35);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.hero-dot.active {
    background: #f97316;
}

.section {
    padding: 70px 0;
}

.section-soft {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 247, 237, 0));
}

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

.section-kicker {
    margin-bottom: 8px;
    color: var(--brand);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-title,
.page-title {
    margin: 0;
    color: #431407;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.section-desc,
.page-desc {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(146, 64, 14, 0.12);
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(146, 64, 14, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(234, 88, 12, 0.36);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

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

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

.poster-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.24);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-overlay {
    opacity: 1;
}

.poster-play {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    background: rgba(234, 88, 12, 0.92);
    border-radius: 50%;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
}

.poster-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    color: #fff;
    background: rgba(0, 0, 0, 0.68);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.card-title {
    margin: 0 0 10px;
    color: #431407;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
}

.card-title a:hover {
    color: var(--brand);
}

.card-desc {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    color: #9a3412;
    font-size: 13px;
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 178px;
    padding: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff, #fff1d6);
    border: 1px solid rgba(146, 64, 14, 0.14);
    border-radius: 24px;
    box-shadow: 0 14px 32px rgba(146, 64, 14, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -46px;
    bottom: -48px;
    width: 132px;
    height: 132px;
    background: rgba(249, 115, 22, 0.12);
    border-radius: 50%;
}

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    color: #431407;
    font-size: 24px;
    font-weight: 950;
}

.category-tile p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #7c2d12;
    line-height: 1.72;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 118px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    background: #fff;
    border: 1px solid rgba(146, 64, 14, 0.12);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(146, 64, 14, 0.07);
}

.rank-number {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    border-radius: 14px;
    font-size: 18px;
    font-weight: 950;
}

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

.rank-title {
    margin: 0 0 7px;
    color: #431407;
    font-size: 18px;
    font-weight: 900;
}

.rank-desc {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.page-hero {
    padding: 76px 0 44px;
    background: radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.25), transparent 34%), linear-gradient(135deg, #fff7ed, #fffbeb);
    border-bottom: 1px solid var(--line);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #9a3412;
    font-size: 14px;
    font-weight: 800;
}

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

.filter-panel,
.search-panel {
    display: grid;
    gap: 16px;
    margin: 30px 0;
    padding: 18px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(146, 64, 14, 0.12);
    border-radius: 24px;
    box-shadow: 0 16px 36px rgba(146, 64, 14, 0.08);
    backdrop-filter: blur(12px);
}

.filter-row,
.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-input,
.search-input,
.filter-select {
    min-height: 48px;
    padding: 0 16px;
    color: var(--text);
    background: #fff;
    border: 1px solid rgba(146, 64, 14, 0.16);
    border-radius: 14px;
    outline: 0;
}

.filter-input,
.search-input {
    flex: 1 1 260px;
}

.filter-select {
    flex: 0 1 180px;
}

.filter-chip {
    padding: 10px 14px;
    color: #9a3412;
    background: #ffedd5;
    border: 1px solid rgba(234, 88, 12, 0.2);
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
}

.filter-chip.active {
    color: #fff;
    background: var(--brand);
}

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

.empty-state.show {
    display: block;
}

.detail-page {
    background: linear-gradient(180deg, #fff7ed, #fffbeb 42%, #ffffff);
}

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

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(146, 64, 14, 0.12);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.video-shell {
    position: relative;
    overflow: hidden;
    background: #050505;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.36));
    border: 0;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    padding-left: 5px;
    background: rgba(234, 88, 12, 0.92);
    border-radius: 50%;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    font-size: 34px;
}

.video-shell.is-playing .play-overlay {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.detail-card {
    margin-top: 22px;
    padding: 28px;
}

.detail-title {
    margin: 0 0 14px;
    color: #431407;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.detail-lead {
    margin: 20px 0;
    color: #7c2d12;
    font-size: 20px;
    line-height: 1.8;
    font-weight: 800;
}

.prose h2 {
    margin: 32px 0 12px;
    color: #431407;
    font-size: 25px;
    font-weight: 950;
}

.prose p {
    margin: 0 0 16px;
    color: #4b5563;
    font-size: 17px;
    line-height: 1.9;
}

.side-card {
    padding: 18px;
}

.side-poster {
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 3 / 4;
}

.side-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-card h2 {
    margin: 18px 0 12px;
    color: #431407;
    font-size: 22px;
    font-weight: 950;
}

.info-list {
    display: grid;
    gap: 10px;
    color: #6b7280;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(146, 64, 14, 0.1);
}

.info-list strong {
    color: #7c2d12;
}

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

.footer {
    margin-top: 60px;
    padding: 38px 5vw;
    color: #7c2d12;
    background: #fff7ed;
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(1180px, 90vw);
    margin: 0 auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-weight: 800;
}

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

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

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

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

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

@media (max-width: 860px) {
    .site-header {
        min-height: 66px;
        padding: 0 4vw;
    }

    .main-nav,
    .header-search {
        position: fixed;
        left: 4vw;
        right: 4vw;
        display: none;
    }

    .main-nav {
        top: 78px;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 20px;
        box-shadow: var(--shadow);
    }

    .header-search {
        top: 310px;
        padding: 10px;
        border-radius: 18px;
    }

    body.nav-open .main-nav,
    body.nav-open .header-search {
        display: flex;
    }

    .header-search input {
        width: 100%;
    }

    .menu-toggle {
        display: inline-flex;
    }

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

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

    .hero-content {
        padding-top: 110px;
    }

    .hero-side {
        grid-template-columns: 1fr;
    }

    .section-header,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .rank-item {
        grid-template-columns: 44px 86px 1fr;
    }

    .rank-item .button-secondary {
        grid-column: 2 / -1;
        width: fit-content;
    }

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

@media (max-width: 560px) {
    .container {
        width: min(94vw, 1180px);
    }

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

    .hero-carousel {
        min-height: 700px;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-actions,
    .filter-row,
    .search-row {
        flex-direction: column;
    }

    .button-primary,
    .button-secondary,
    .search-button {
        width: 100%;
    }

    .card-body,
    .detail-card {
        padding: 20px;
    }
}
