:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --ink: #1f1305;
    --muted: #7c5d3b;
    --line: rgba(146, 64, 14, 0.16);
    --amber: #f59e0b;
    --orange: #ea580c;
    --red: #b91c1c;
    --brown: #78350f;
    --card: rgba(255, 255, 255, 0.82);
    --glass: rgba(255, 247, 237, 0.72);
    --shadow: 0 24px 60px rgba(120, 53, 15, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.36), transparent 34rem),
        linear-gradient(135deg, #fff7ed 0%, #fffbeb 46%, #fee2e2 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    color: #fff7ed;
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.86), rgba(154, 52, 18, 0.82));
    backdrop-filter: blur(18px);
    transition: box-shadow 0.28s ease, background 0.28s ease;
}

.site-header.scrolled {
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.97), rgba(154, 52, 18, 0.96));
    box-shadow: 0 18px 40px rgba(67, 20, 7, 0.22);
}

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

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #78350f;
    border-radius: 14px;
    background: linear-gradient(135deg, #fde68a, #fb923c);
    box-shadow: 0 12px 30px rgba(251, 146, 60, 0.28);
}

.brand-name {
    font-size: 1.16rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
    color: rgba(255, 251, 235, 0.86);
    font-weight: 700;
    transition: color 0.22s ease, transform 0.22s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border: 1px solid rgba(253, 230, 138, 0.26);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.header-search input {
    width: 220px;
    border: 0;
    outline: 0;
    color: #fff7ed;
    background: transparent;
    padding: 9px 8px 9px 14px;
}

.header-search input::placeholder {
    color: rgba(254, 243, 199, 0.72);
}

.header-search button {
    border: 0;
    color: #78350f;
    cursor: pointer;
    font-weight: 800;
    border-radius: 999px;
    padding: 8px 14px;
    background: #fde68a;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    cursor: pointer;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff7ed;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(120, 53, 15, 0.82);
}

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

main,
.page-main,
.detail-main {
    padding-top: 76px;
}

.hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: #431407;
}

.hero-slider,
.hero-slide,
.hero-backdrop,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-backdrop {
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    transition: transform 5s ease;
    filter: saturate(1.08);
}

.hero-slide.active .hero-backdrop {
    transform: scale(1.12);
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(67, 20, 7, 0.92) 0%, rgba(67, 20, 7, 0.72) 42%, rgba(67, 20, 7, 0.2) 100%),
        radial-gradient(circle at 20% 15%, rgba(251, 191, 36, 0.45), transparent 28rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 78vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 52px;
    color: #fff7ed;
}

.hero-copy {
    max-width: 760px;
    padding-top: 40px;
}

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

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2.6rem, 6vw, 5.6rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-one-line {
    max-width: 680px;
    color: rgba(255, 247, 237, 0.88);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.75;
}

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

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 900;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
    color: #78350f;
    background: linear-gradient(135deg, #fde68a, #fb923c);
    box-shadow: 0 16px 34px rgba(251, 146, 60, 0.28);
}

.ghost-button {
    color: #fff7ed;
    border: 1px solid rgba(253, 230, 138, 0.36);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-poster {
    display: block;
    border: 1px solid rgba(253, 230, 138, 0.32);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

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

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #fff7ed;
    font-size: 2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

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

.hero-dot.active {
    width: 32px;
    background: #fde68a;
}

.content-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 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(1.8rem, 3vw, 2.8rem);
    line-height: 1.05;
}

.section-heading p {
    margin: 10px 0 0;
    color: var(--muted);
}

.section-more {
    color: #7c2d12;
    background: #ffedd5;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 70px rgba(120, 53, 15, 0.22);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #fed7aa;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #78350f;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 900;
    background: rgba(254, 243, 199, 0.92);
}

.movie-card-body {
    padding: 18px;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 1.12rem;
    line-height: 1.35;
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.95rem;
}

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

.tag-row span {
    color: #9a3412;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 800;
    background: #ffedd5;
}

.hero-tags span {
    color: #fff7ed;
    border: 1px solid rgba(253, 230, 138, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

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

.category-tile,
.category-card a {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 28px;
    padding: 22px;
    color: #fff7ed;
    background: #431407;
    box-shadow: var(--shadow);
}

.category-tile img,
.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: transform 0.45s ease;
}

.category-tile::after,
.category-card a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(67, 20, 7, 0.88));
}

.category-tile:hover img,
.category-card a:hover img {
    transform: scale(1.08);
}

.category-tile span,
.category-tile small,
.category-card div {
    position: relative;
    z-index: 2;
}

.category-tile span,
.category-card h2 {
    font-size: 1.2rem;
    font-weight: 900;
}

.category-tile small,
.category-card p {
    margin-top: 8px;
    color: rgba(255, 247, 237, 0.84);
    line-height: 1.55;
}

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

.category-card a {
    min-height: 260px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 56px 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 16px 42px rgba(120, 53, 15, 0.1);
}

.rank-row strong {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #7c2d12;
    border-radius: 14px;
    background: linear-gradient(135deg, #fde68a, #fdba74);
}

.rank-row img {
    width: 64px;
    height: 86px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-row span {
    min-width: 0;
    font-weight: 900;
}

.rank-row small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 600;
}

.rank-row em {
    color: #ea580c;
    font-style: normal;
    font-weight: 900;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 38px auto 0;
    padding: 56px;
    border-radius: 34px;
    color: #fff7ed;
    background:
        radial-gradient(circle at top right, rgba(253, 186, 116, 0.44), transparent 24rem),
        linear-gradient(135deg, #78350f, #9a3412 60%, #c2410c);
    box-shadow: var(--shadow);
}

.small-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.filter-bar {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 16px 42px rgba(120, 53, 15, 0.08);
}

.filter-bar input {
    width: 100%;
    border: 1px solid rgba(154, 52, 18, 0.16);
    outline: 0;
    border-radius: 18px;
    padding: 14px 16px;
    background: #fffaf0;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip-row button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 9px 14px;
    color: #7c2d12;
    font-weight: 900;
    background: #ffedd5;
}

.chip-row button.active {
    color: #fff7ed;
    background: #c2410c;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 18px;
    color: var(--muted);
    font-weight: 800;
}

.breadcrumb a {
    color: #9a3412;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 34px;
    border-radius: 34px;
    color: #fff7ed;
    background:
        radial-gradient(circle at bottom left, rgba(251, 191, 36, 0.42), transparent 26rem),
        linear-gradient(135deg, #431407, #78350f 62%, #9a3412);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info h1 {
    font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.detail-meta span {
    color: #78350f;
    border-radius: 999px;
    padding: 7px 12px;
    background: #fde68a;
}

.player-section {
    margin: 34px 0;
}

.stream-player {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: #120906;
    box-shadow: 0 28px 80px rgba(67, 20, 7, 0.22);
}

.stream-player video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #120906;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(18, 9, 6, 0.1), rgba(18, 9, 6, 0.58));
}

.play-cover span {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    color: #78350f;
    border-radius: 50%;
    font-size: 2rem;
    background: linear-gradient(135deg, #fde68a, #fb923c);
    box-shadow: 0 18px 44px rgba(251, 146, 60, 0.34);
}

.stream-player.is-playing .play-cover {
    display: none;
}

.detail-copy {
    display: grid;
    gap: 16px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
}

.detail-copy h2 {
    margin: 0;
    font-size: 1.5rem;
}

.detail-copy p {
    margin: 0;
    color: #5f4327;
    line-height: 1.9;
    font-size: 1.04rem;
}

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

.movie-card.compact .movie-card-body {
    padding: 14px;
}

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

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

.footer-inner p {
    max-width: 520px;
    color: rgba(255, 237, 213, 0.74);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    font-weight: 800;
}

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

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

    .menu-button {
        display: block;
        margin-left: auto;
    }

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

    .hero-poster {
        display: none;
    }

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

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

    main,
    .page-main,
    .detail-main {
        padding-top: 66px;
    }

    .hero,
    .hero-content {
        min-height: 72vh;
    }

    .hero-content,
    .content-section,
    .page-hero,
    .detail-main,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

    .hero-actions,
    .section-heading,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .page-hero,
    .detail-hero,
    .detail-copy {
        padding: 24px;
        border-radius: 26px;
    }

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

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

    .rank-row em {
        display: none;
    }
}
