:root {
    --color-sand-50: #faf8f3;
    --color-sand-100: #f5f0e6;
    --color-sand-200: #ebe2cd;
    --color-sand-300: #ddc9a3;
    --color-sand-400: #d4b683;
    --color-sand-500: #c49a5c;
    --color-sand-600: #b07d44;
    --color-sand-700: #8f6235;
    --color-sand-800: #6d4a29;
    --color-sand-900: #4a3218;
    --color-dune-50: #fdf6ed;
    --color-dune-100: #fae9d1;
    --color-dune-200: #f5d4a3;
    --color-dune-300: #ebb76a;
    --color-dune-400: #e19838;
    --color-dune-500: #d97c1e;
    --color-dune-600: #c05f14;
    --color-dune-700: #9c4613;
    --color-dune-800: #7d3714;
    --color-dune-900: #642d13;
    --shadow-soft: 0 18px 50px rgba(74, 50, 24, 0.14);
    --shadow-card: 0 12px 30px rgba(74, 50, 24, 0.12);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--color-sand-50);
    color: var(--color-sand-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(221, 201, 163, 0.7);
    backdrop-filter: blur(16px);
    box-shadow: 0 6px 20px rgba(74, 50, 24, 0.08);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-dune-500), var(--color-dune-700));
    box-shadow: 0 10px 20px rgba(217, 124, 30, 0.28);
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(90deg, var(--color-dune-600), var(--color-sand-800));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
}

.nav-link {
    font-size: 15px;
    color: var(--color-sand-700);
    font-weight: 650;
    transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-dune-600);
}

.menu-button {
    display: none;
    border: 0;
    background: var(--color-sand-100);
    color: var(--color-sand-900);
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.mobile-nav a {
    display: block;
    padding: 10px 8px;
    font-weight: 700;
    color: var(--color-sand-800);
}

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

.hero {
    position: relative;
    overflow: hidden;
    min-height: 610px;
    background: radial-gradient(circle at 8% 8%, rgba(217, 124, 30, 0.20), transparent 32%), linear-gradient(135deg, var(--color-sand-100), #ffffff 48%, var(--color-dune-50));
}

.hero-inner {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0 72px;
}

.hero-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 999px;
    filter: blur(20px);
    opacity: 0.55;
}

.hero-glow-one {
    right: 12%;
    top: 12%;
    background: rgba(217, 124, 30, 0.20);
}

.hero-glow-two {
    left: 5%;
    bottom: -90px;
    background: rgba(196, 154, 92, 0.24);
}

.hero-slide {
    display: none;
    min-height: 480px;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
}

.hero-slide.is-active {
    display: grid;
    animation: fadeIn 0.45s ease both;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 7px 13px;
    border: 1px solid rgba(217, 124, 30, 0.28);
    border-radius: 999px;
    color: var(--color-dune-700);
    background: rgba(255, 255, 255, 0.72);
    font-weight: 800;
    font-size: 14px;
}

.hero h1 {
    margin: 0;
    color: var(--color-sand-900);
    font-size: clamp(42px, 6vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 22px 0 0;
    max-width: 690px;
    color: var(--color-sand-700);
    font-size: 18px;
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    background: var(--color-dune-100);
    color: var(--color-dune-800);
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    padding: 7px 12px;
}

.tag-row span {
    padding: 5px 9px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

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

.btn-primary {
    background: var(--color-dune-500);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(217, 124, 30, 0.28);
}

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

.btn-primary:hover {
    background: var(--color-dune-600);
    box-shadow: 0 18px 38px rgba(217, 124, 30, 0.34);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.75);
    color: var(--color-sand-800);
    border: 1px solid rgba(221, 201, 163, 0.78);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    min-height: 440px;
    border-radius: 34px;
    background: linear-gradient(135deg, var(--color-sand-200), var(--color-dune-100));
    box-shadow: 0 28px 80px rgba(74, 50, 24, 0.22);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(74, 50, 24, 0.24));
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 440px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hero-poster:hover img {
    transform: scale(1.04);
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 30px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: var(--color-sand-300);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 54px;
    background: var(--color-dune-500);
}

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

.section.alt {
    width: 100%;
    max-width: none;
    background: linear-gradient(180deg, #ffffff, var(--color-sand-50));
}

.section.alt > .section-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 26px;
}

.heading-bar {
    width: 5px;
    height: 38px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--color-dune-500), var(--color-dune-700));
}

.section-heading h2,
.page-head h1,
.detail-title h1 {
    margin: 0;
    color: var(--color-sand-900);
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(25px, 3vw, 34px);
}

.section-heading p,
.page-head p {
    margin: 3px 0 0;
    color: var(--color-sand-600);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px rgba(74, 50, 24, 0.17);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--color-sand-200), var(--color-dune-100));
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35));
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-dune-500), var(--color-dune-700));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.movie-info {
    padding: 17px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--color-sand-600);
    font-size: 13px;
    font-weight: 700;
}

.movie-info h3 {
    margin: 7px 0 8px;
    color: var(--color-sand-900);
    font-size: 18px;
    line-height: 1.32;
}

.movie-info h3 a:hover {
    color: var(--color-dune-600);
}

.movie-info p {
    margin: 0 0 13px;
    display: -webkit-box;
    overflow: hidden;
    color: var(--color-sand-700);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.text-link {
    display: inline-flex;
    margin-top: 13px;
    color: var(--color-dune-700);
    font-weight: 800;
    font-size: 14px;
}

.horizontal-scroll {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 4px 20px;
    scroll-snap-type: x proximity;
}

.horizontal-scroll .movie-card {
    width: 282px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 178px;
    border-radius: var(--radius-lg);
    padding: 24px;
    background: linear-gradient(135deg, #ffffff, var(--color-dune-50));
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 44px rgba(74, 50, 24, 0.16);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -34px;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: rgba(217, 124, 30, 0.14);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: var(--color-sand-900);
}

.category-card p {
    margin: 0;
    color: var(--color-sand-700);
}

.search-panel {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    padding: 10px;
    border: 1px solid rgba(221, 201, 163, 0.75);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 35px rgba(74, 50, 24, 0.08);
}

.search-panel input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 12px 14px;
    color: var(--color-sand-900);
    background: transparent;
}

.search-panel button,
.filter-chip {
    border: 0;
    border-radius: 13px;
    color: var(--color-sand-800);
    background: var(--color-sand-100);
    font-weight: 800;
    transition: background 0.25s ease, color 0.25s ease;
}

.search-panel button {
    padding: 0 18px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
}

.filter-chip {
    padding: 9px 14px;
}

.filter-chip:hover,
.filter-chip.active,
.search-panel button:hover {
    color: #ffffff;
    background: var(--color-dune-500);
}

.page-head {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 20px;
}

.page-head h1 {
    font-size: clamp(32px, 4vw, 48px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    color: var(--color-sand-600);
    font-size: 14px;
    font-weight: 700;
}

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

.detail-wrap {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 62px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 0.84fr 1.16fr;
    gap: 34px;
    align-items: stretch;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    min-height: 520px;
    background: linear-gradient(135deg, var(--color-sand-200), var(--color-dune-100));
    box-shadow: var(--shadow-soft);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
}

.detail-panel {
    border-radius: 28px;
    padding: 32px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.detail-title h1 {
    font-size: clamp(34px, 5vw, 62px);
}

.detail-title p {
    margin: 16px 0 22px;
    color: var(--color-sand-700);
    font-size: 18px;
}

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

.detail-meta span {
    padding: 8px 11px;
    border-radius: 999px;
    background: var(--color-sand-100);
    color: var(--color-sand-800);
    font-weight: 800;
    font-size: 14px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    margin-top: 24px;
    border-radius: 24px;
    background: #17110b;
    aspect-ratio: 16 / 9;
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.23);
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #17110b;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(217, 124, 30, 0.12), rgba(0, 0, 0, 0.58));
}

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

.play-circle {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(217, 124, 30, 0.92);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    font-size: 32px;
    transform: translateX(2px);
}

.content-block {
    margin-top: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-card {
    border-radius: 22px;
    padding: 26px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.content-card p {
    margin: 0;
    color: var(--color-sand-700);
}

.related-section {
    margin-top: 48px;
}

.site-footer {
    background: #ffffff;
    border-top: 1px solid rgba(221, 201, 163, 0.7);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 28px;
    align-items: center;
}

.footer-brand {
    color: var(--color-dune-700);
    font-size: 20px;
}

.footer-inner p {
    margin: 8px 0 0;
    color: var(--color-sand-600);
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.footer-links a {
    color: var(--color-sand-700);
    font-weight: 700;
}

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

.empty-state {
    display: none;
    padding: 42px;
    border-radius: 24px;
    text-align: center;
    background: #ffffff;
    color: var(--color-sand-700);
    box-shadow: var(--shadow-card);
}

.empty-state.is-visible {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .desktop-nav {
        gap: 13px;
    }

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

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

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

@media (max-width: 860px) {
    .desktop-nav {
        display: none;
    }

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

    .hero-slide {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 30px;
    }

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

    .hero-poster img {
        min-height: 360px;
    }

    .hero-dots {
        bottom: 24px;
    }

    .movie-grid,
    .movie-grid.dense,
    .category-grid,
    .content-block,
    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .header-inner,
    .hero-inner,
    .section,
    .section.alt > .section-inner,
    .page-head,
    .detail-wrap,
    .footer-inner {
        width: min(100% - 24px, 1280px);
    }

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

    .hero {
        min-height: auto;
    }

    .hero-inner {
        padding: 34px 0 62px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-poster,
    .hero-poster img {
        min-height: 300px;
    }

    .movie-grid,
    .movie-grid.dense,
    .category-grid,
    .content-block,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .search-panel {
        flex-direction: column;
    }

    .search-panel button {
        min-height: 44px;
    }

    .detail-panel {
        padding: 22px;
    }

    .detail-poster,
    .detail-poster img {
        min-height: 360px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}
