* {
    box-sizing: border-box;
}

:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --text: #431407;
    --muted: #92400e;
    --muted-soft: #b45309;
    --primary: #92400e;
    --primary-dark: #451a03;
    --primary-soft: #fef3c7;
    --card: #ffffff;
    --line: #fde68a;
    --shadow: 0 18px 45px rgba(120, 53, 15, 0.14);
    --radius: 22px;
}

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, #fffbeb 0%, #fff7ed 46%, #fffbeb 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
    border-bottom: 2px solid #fde68a;
    box-shadow: 0 10px 30px rgba(146, 64, 14, 0.12);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    color: #78350f;
    white-space: nowrap;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff7ed;
    border-radius: 16px;
    background: linear-gradient(135deg, #92400e, #f59e0b);
    box-shadow: 0 12px 25px rgba(146, 64, 14, 0.26);
}

.brand-text {
    font-size: clamp(20px, 2vw, 28px);
    letter-spacing: 0.02em;
}

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

.nav-link {
    color: #78350f;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #431407;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 320px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid #fcd34d;
    border-radius: 999px;
    background: #fff;
    color: #78350f;
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.25);
}

.header-search button,
.mobile-search button,
.filter-panel button {
    border: 0;
    color: #fff7ed;
    background: #92400e;
    padding: 12px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #fef3c7;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #78350f;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-link {
    display: block;
    padding: 12px 0;
    color: #78350f;
    font-weight: 700;
    border-top: 1px solid #fde68a;
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 650px;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.28), transparent 34%), linear-gradient(135deg, #451a03, #9a3412 54%, #451a03);
    color: #fff7ed;
}

.hero-stage {
    position: relative;
    min-height: 650px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: center;
    gap: 48px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    opacity: 0;
    transform: translateX(36px);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(69, 26, 3, 0.94), rgba(69, 26, 3, 0.58), rgba(69, 26, 3, 0.9)), var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(4px) saturate(1.1);
    opacity: 0.35;
    transform: scale(1.05);
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-content,
.hero-cover {
    position: relative;
    z-index: 2;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fde68a;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hero-content h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 680px;
    color: #ffedd5;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.7;
    margin: 24px 0;
}

.hero-tags,
.tag-list,
.genre-links,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-list span,
.genre-links a,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #78350f;
    background: #fef3c7;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 14px;
}

.hero-actions,
.detail-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.small-btn,
.text-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #78350f;
    background: #fff7ed;
    padding: 15px 26px;
    box-shadow: 0 16px 35px rgba(255, 247, 237, 0.22);
}

.primary-btn:hover,
.small-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(146, 64, 14, 0.22);
}

.ghost-btn {
    color: #fff7ed;
    border: 2px solid rgba(255, 247, 237, 0.55);
    padding: 13px 24px;
}

.ghost-btn.dark {
    color: #78350f;
    border-color: #fcd34d;
}

.hero-cover {
    min-width: 0;
}

.poster {
    position: relative;
    overflow: hidden;
    display: block;
    background: linear-gradient(135deg, #fef3c7, #fdba74 45%, #78350f);
    box-shadow: var(--shadow);
}

.poster::after {
    content: attr(data-title);
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 1;
    color: #fff7ed;
    font-weight: 900;
    line-height: 1.35;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    transition: transform 0.45s ease;
}

.poster-link:hover .cover-img,
.movie-card-wide:hover .cover-img,
.hero-cover:hover .cover-img {
    transform: scale(1.08);
}

.poster-card,
.poster-wide,
.poster-hero,
.poster-detail {
    aspect-ratio: 16 / 9;
    border-radius: 18px;
}

.poster-hero {
    border-radius: 28px;
    min-height: 390px;
    border: 4px solid rgba(255, 247, 237, 0.22);
}

.poster-detail {
    aspect-ratio: 3 / 4;
    border-radius: 28px;
}

.play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #78350f;
    background: rgba(255, 247, 237, 0.92);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.24);
}

.poster:hover .play-badge,
.hero-cover:hover .play-badge,
.detail-poster:hover .play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
}

.hero-controls button {
    border: 0;
    cursor: pointer;
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    color: #78350f;
    background: #fff7ed;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 247, 237, 0.5);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: #fcd34d;
}

.intro-panel,
.cta-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 64px;
    padding: 32px;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
}

.intro-panel h2,
.cta-panel h2,
.section-heading h2,
.rank-panel h2,
.content-card h2,
.side-panel h2 {
    margin: 0;
    color: #431407;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.intro-panel p,
.cta-panel p,
.section-heading p {
    color: var(--muted);
    line-height: 1.8;
    margin: 10px 0 0;
}

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

.section-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #92400e;
    font-weight: 900;
}

.section-more span {
    font-size: 26px;
    transition: transform 0.2s ease;
}

.section-more:hover span {
    transform: translateX(4px);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 12px 30px rgba(146, 64, 14, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: #fbbf24;
    box-shadow: var(--shadow);
}

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

.movie-type {
    display: inline-flex;
    color: #78350f;
    background: #fef3c7;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 12px;
}

.movie-card h3,
.wide-content h3 {
    margin: 0 0 10px;
    color: #431407;
    font-size: 21px;
    line-height: 1.35;
}

.movie-card p,
.wide-content p {
    color: #92400e;
    line-height: 1.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #b45309;
    font-size: 13px;
    font-weight: 700;
    margin-top: 16px;
}

.small-btn {
    color: #fff7ed;
    background: #92400e;
    padding: 9px 16px;
}

.text-btn {
    color: #92400e;
    padding: 9px 0;
}

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

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

.category-grid-large {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 54px;
}

.category-card {
    display: grid;
    place-items: center;
    min-height: 120px;
    padding: 20px;
    text-align: center;
    border: 1px solid #fde68a;
    border-radius: 18px;
    background: #ffffff;
    color: #78350f;
    box-shadow: 0 10px 25px rgba(146, 64, 14, 0.09);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card span {
    font-size: 34px;
    color: #d97706;
}

.category-card strong {
    font-size: 17px;
}

.rank-panel,
.side-panel,
.content-card,
.filter-panel {
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

.rank-panel {
    position: sticky;
    top: 100px;
    padding: 26px;
}

.rank-list {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}

.rank-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid #fde68a;
}

.rank-num {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: #fff7ed;
    background: linear-gradient(135deg, #92400e, #f59e0b);
    border-radius: 12px;
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    color: #431407;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-score {
    color: #b45309;
    font-weight: 900;
}

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

.movie-card-wide {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
}

.wide-poster {
    min-height: 100%;
}

.poster-wide {
    height: 100%;
    border-radius: 0;
}

.cta-panel {
    flex-direction: column;
    margin-bottom: 70px;
    text-align: center;
    background: linear-gradient(135deg, #92400e, #c2410c);
    color: #fff7ed;
}

.cta-panel h2,
.cta-panel p {
    color: #fff7ed;
}

.sub-hero,
.detail-hero,
.play-page {
    padding: 66px 0;
    color: #fff7ed;
    background: radial-gradient(circle at 20% 10%, rgba(251, 191, 36, 0.33), transparent 34%), linear-gradient(135deg, #78350f, #9a3412 58%, #431407);
}

.sub-hero h1,
.play-page h1 {
    margin: 0 0 14px;
    font-size: clamp(38px, 5vw, 58px);
    letter-spacing: -0.04em;
}

.sub-hero p,
.play-page p {
    max-width: 760px;
    color: #ffedd5;
    line-height: 1.8;
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin: 32px 0;
    padding: 18px;
}

.filter-selects {
    display: flex;
    gap: 10px;
}

.filter-panel select {
    min-width: 132px;
}

.library-grid,
.ranking-wide-list {
    margin-bottom: 70px;
}

.empty-state {
    margin: 40px 0 80px;
    color: #92400e;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
}

.detail-grid {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 46px;
    align-items: center;
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 780px;
    color: #ffedd5;
    line-height: 1.8;
    font-size: 20px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
    margin-top: 42px;
}

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

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

.content-card p {
    color: #78350f;
    line-height: 2;
    font-size: 17px;
}

.review-card {
    border-left: 6px solid #f59e0b;
}

.genre-links,
.tag-list {
    margin-top: 16px;
}

.side-panel {
    position: sticky;
    top: 100px;
}

.side-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.side-list .movie-card-wide {
    grid-template-columns: 120px minmax(0, 1fr);
}

.side-list .wide-content {
    padding: 12px;
}

.side-list .wide-content p,
.side-list .meta-row,
.side-list .card-actions,
.side-list .movie-type {
    display: none;
}

.side-list .wide-content h3 {
    font-size: 15px;
    margin: 0;
}

.player-wrap {
    margin: 28px 0;
}

.compact-player {
    margin-top: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: radial-gradient(circle at center, #78350f, #000 70%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.site-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    color: #78350f;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    background: rgba(255, 247, 237, 0.94);
    font-size: 34px;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

.player-shell.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.back-link {
    display: inline-flex;
    color: #fde68a;
    font-weight: 900;
    margin-bottom: 22px;
}

.site-footer {
    margin-top: 70px;
    color: #ffedd5;
    background: linear-gradient(180deg, #78350f, #431407);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: flex;
    justify-content: space-between;
    gap: 32px;
}

.footer-brand {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 10px;
}

.footer-inner p {
    color: #fde68a;
    max-width: 560px;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-content: start;
}

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

@media (max-width: 1100px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-nav.is-open {
        display: block;
    }

    .hero-slide,
    .detail-grid,
    .detail-content-grid,
    .two-column-section {
        grid-template-columns: 1fr;
    }

    .hero-slider,
    .hero-stage {
        min-height: 820px;
    }

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

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

    .rank-panel,
    .side-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .header-inner {
        height: 68px;
    }

    .brand-text {
        font-size: 20px;
    }

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

    .hero-slide {
        gap: 24px;
        padding-top: 28px;
        align-content: center;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .poster-hero {
        min-height: 230px;
    }

    .intro-panel,
    .filter-panel,
    .footer-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-panel {
        display: block;
    }

    .filter-selects {
        display: grid;
        margin-top: 12px;
    }

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

    .movie-card-wide {
        grid-template-columns: 1fr;
    }

    .poster-wide {
        height: auto;
        border-radius: 18px 18px 0 0;
    }

    .section-heading {
        display: block;
    }

    .detail-grid {
        gap: 28px;
    }

    .detail-content-grid {
        display: block;
    }

    .side-panel {
        margin-top: 28px;
    }
}
