:root {
    --amber-50: #fff7ed;
    --amber-100: #ffedd5;
    --amber-200: #fed7aa;
    --amber-300: #fdba74;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --orange-600: #ea580c;
    --red-700: #b91c1c;
    --stone-950: #0c0a09;
    --text-dark: #1c1917;
    --text-soft: #57534e;
    --card-bg: rgba(255, 255, 255, 0.84);
    --shadow-soft: 0 18px 50px rgba(120, 53, 15, 0.16);
    --shadow-strong: 0 24px 70px rgba(120, 53, 15, 0.28);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text-dark);
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 45%, #fee2e2 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 10%, rgba(251, 146, 60, 0.18), transparent 34%),
        radial-gradient(circle at 88% 12%, rgba(185, 28, 28, 0.16), transparent 30%),
        radial-gradient(circle at 50% 92%, rgba(245, 158, 11, 0.12), transparent 35%);
    z-index: -1;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

main {
    min-height: 72vh;
}

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

.site-header.scrolled {
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.96), rgba(124, 45, 18, 0.96));
    box-shadow: 0 16px 35px rgba(41, 37, 36, 0.22);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff7ed;
    white-space: nowrap;
}

.logo {
    font-size: clamp(18px, 2vw, 24px);
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
    box-shadow: 0 10px 24px rgba(234, 88, 12, 0.34);
    font-size: 14px;
}

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

.nav-link {
    color: rgba(255, 237, 213, 0.9);
    font-weight: 650;
    transition: color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    transform: translateY(-1px);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-box input,
.search-panel input,
.filter-box select,
.search-panel select {
    border: 1px solid rgba(251, 191, 36, 0.28);
    outline: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 11px 16px;
    transition: background 180ms ease, box-shadow 180ms ease, border 180ms ease;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.search-panel input::placeholder,
.filter-box input::placeholder {
    color: rgba(255, 237, 213, 0.72);
}

.header-search input {
    width: 240px;
}

.header-search button,
.mobile-search button {
    border: 0;
    color: white;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    padding: 10px 16px;
}

.menu-toggle {
    display: none;
    border: 0;
    color: white;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 10px 13px;
}

.mobile-panel {
    display: none;
    padding: 16px;
    background: rgba(120, 53, 15, 0.98);
    border-top: 1px solid rgba(251, 191, 36, 0.2);
}

.mobile-panel.open {
    display: block;
}

.mobile-search {
    width: min(100%, 520px);
    margin: 0 auto 14px;
}

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

.mobile-nav {
    display: grid;
    width: min(100%, 520px);
    margin: 0 auto;
    gap: 8px;
}

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    color: #ffedd5;
    background: rgba(255, 255, 255, 0.08);
}

.hero {
    position: relative;
    height: min(80vh, 780px);
    min-height: 560px;
    overflow: hidden;
    background: var(--stone-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 800ms ease, visibility 800ms ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    transition: transform 1000ms ease;
}

.hero:hover .hero-bg {
    transform: scale(1.12);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.42) 50%, rgba(0, 0, 0, 0.12) 100%),
        linear-gradient(90deg, rgba(120, 53, 15, 0.52), rgba(0, 0, 0, 0.05));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - var(--max-width)) / 2));
    right: 24px;
    bottom: clamp(70px, 12vh, 120px);
    max-width: 760px;
    color: white;
    animation: fadeUp 760ms ease both;
}

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

.hero-kickers span,
.detail-kickers span {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 12px;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    font-size: 14px;
}

.hero-kickers span:first-child {
    background: rgba(217, 119, 6, 0.9);
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 10px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.hero-one-line,
.detail-one-line {
    margin: 0 0 12px;
    color: #ffedd5;
    font-size: clamp(18px, 2.4vw, 24px);
    font-weight: 700;
}

.hero-summary {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.hero-tags span,
.tag-row span,
.detail-tags a {
    border-radius: 999px;
    padding: 6px 10px;
    color: #7c2d12;
    background: rgba(255, 237, 213, 0.88);
    font-size: 13px;
    font-weight: 650;
}

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

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-btn {
    color: white;
    padding: 13px 28px;
    background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 18px 38px rgba(217, 119, 6, 0.35);
}

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

.ghost-btn {
    color: #fff7ed;
    padding: 12px 22px;
    border: 1px solid rgba(255, 237, 213, 0.36);
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: white;
    background: rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(8px);
    font-size: 34px;
    line-height: 1;
    opacity: 0;
    transition: opacity 180ms ease, background 180ms ease;
}

.hero:hover .hero-arrow {
    opacity: 1;
}

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

.hero-arrow.left {
    left: 24px;
}

.hero-arrow.right {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 240ms ease, background 240ms ease;
}

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

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

.section-tight {
    padding-top: 64px;
}

.soft-section {
    width: 100%;
    max-width: none;
    padding-inline: max(16px, calc((100vw - var(--max-width)) / 2));
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.74), rgba(255, 237, 213, 0.2));
}

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

.section-head h2,
.detail-article h2,
.site-footer h2 {
    margin: 0;
    color: var(--text-dark);
    font-size: clamp(26px, 3.4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head p,
.detail-article p,
.overview-card p,
.category-tile p,
.site-footer p {
    margin: 8px 0 0;
    color: var(--text-soft);
}

.section-head a,
.text-link {
    color: var(--amber-600);
    font-weight: 800;
}

.movie-grid,
.featured-grid,
.ranking-grid,
.category-grid,
.overview-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

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

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

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

.movie-card,
.category-tile,
.overview-card,
.detail-article,
.player-shell,
.filter-box,
.search-panel {
    border: 1px solid rgba(251, 191, 36, 0.16);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.movie-card {
    position: relative;
    overflow: hidden;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #78350f, #b45309);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 520ms ease, filter 520ms ease;
}

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

.play-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 44px;
    opacity: 0;
    transform: scale(0.76);
    transition: opacity 220ms ease, transform 220ms ease;
    background: rgba(0, 0, 0, 0.16);
}

.movie-card:hover .play-hover {
    opacity: 1;
    transform: scale(1);
}

.type-badge,
.year-badge,
.rank-badge {
    position: absolute;
    z-index: 3;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 9px;
    background: rgba(217, 119, 6, 0.92);
    backdrop-filter: blur(8px);
}

.type-badge {
    top: 10px;
    left: 10px;
}

.year-badge {
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 34px;
    text-align: center;
    background: linear-gradient(135deg, #f59e0b, #dc2626);
}

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

.movie-card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    color: var(--text-dark);
    font-weight: 850;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 180ms ease;
}

.movie-card-title:hover {
    color: var(--amber-600);
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    color: #78716c;
    font-size: 13px;
}

.meta-line span {
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(245, 245, 244, 0.9);
}

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 142px 1fr;
    min-height: 190px;
}

.movie-card.horizontal .poster-wrap {
    aspect-ratio: auto;
    height: 100%;
}

.movie-card.horizontal .movie-card-title {
    min-height: auto;
    font-size: 18px;
}

.movie-card.horizontal p {
    display: -webkit-box;
    overflow: hidden;
    margin: 10px 0 0;
    color: var(--text-soft);
    font-size: 14px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.movie-card.horizontal .rank-badge {
    position: absolute;
    z-index: 5;
}

.tag-row {
    margin-top: 12px;
}

.category-tile {
    min-height: 160px;
    padding: 24px;
    transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.category-tile:hover,
.overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
    background: rgba(255, 255, 255, 0.94);
}

.category-tile span,
.overview-card h2 {
    color: var(--text-dark);
    font-size: 22px;
    font-weight: 850;
}

.page-hero {
    position: relative;
    margin-top: 74px;
    padding: 86px max(16px, calc((100vw - var(--max-width)) / 2));
    color: white;
    background:
        radial-gradient(circle at 16% 26%, rgba(253, 186, 116, 0.28), transparent 34%),
        linear-gradient(135deg, #78350f, #9a3412 46%, #7f1d1d);
    overflow: hidden;
}

.page-hero.compact {
    min-height: 330px;
    display: flex;
    align-items: center;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 237, 213, 0.9);
    font-size: 18px;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: #fed7aa;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.inline-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.inline-category-nav a {
    color: #fff7ed;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.14);
}

.overview-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 18px;
    padding: 18px;
    transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.overview-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    overflow: hidden;
    border-radius: 16px;
    background: #78350f;
}

.overview-cover img {
    width: 100%;
    height: 112px;
    object-fit: cover;
}

.filter-box,
.search-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px;
    margin-bottom: 24px;
}

.filter-box input,
.filter-box select,
.search-panel input,
.search-panel select {
    min-width: 210px;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.82);
}

.filter-box input,
.search-panel input {
    flex: 1 1 280px;
}

.search-panel {
    margin-top: 26px;
    max-width: 920px;
}

.detail-hero {
    position: relative;
    margin-top: 74px;
    min-height: 680px;
    color: white;
    background: var(--stone-950);
    overflow: hidden;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 10, 9, 0.94) 0%, rgba(12, 10, 9, 0.72) 54%, rgba(12, 10, 9, 0.38) 100%),
        linear-gradient(0deg, rgba(12, 10, 9, 0.92) 0%, transparent 58%);
}

.detail-wrap {
    position: relative;
    z-index: 2;
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 80px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 34px;
    color: rgba(255, 237, 213, 0.78);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: white;
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 44px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 237, 213, 0.22);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

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

.detail-info h1 {
    margin-top: 20px;
}

.detail-meta {
    display: grid;
    gap: 8px;
    margin: 18px 0;
    color: rgba(255, 255, 255, 0.84);
}

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

.player-section {
    padding-top: 64px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #050505;
    border-radius: 26px;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
}

.player-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050505;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.42));
    transition: opacity 180ms ease, visibility 180ms ease;
}

.player-overlay span {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 18px 42px rgba(217, 119, 6, 0.38);
    font-size: 34px;
    padding-left: 6px;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-article {
    padding: 30px;
}

.detail-article h2 {
    margin-top: 24px;
    font-size: 28px;
}

.detail-article h2:first-child {
    margin-top: 0;
}

.detail-article p {
    color: #44403c;
    font-size: 17px;
}

.site-footer {
    color: #fed7aa;
    background: linear-gradient(180deg, #431407, #0c0a09);
    padding: 54px max(16px, calc((100vw - var(--max-width)) / 2)) 28px;
}

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

.site-footer h2 {
    color: #fff7ed;
    font-size: 18px;
    margin-bottom: 14px;
}

.site-footer p,
.site-footer a {
    color: rgba(254, 215, 170, 0.82);
}

.site-footer ul {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer a:hover {
    color: white;
}

.footer-bottom {
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid rgba(254, 215, 170, 0.16);
    color: rgba(254, 215, 170, 0.62);
    font-size: 14px;
}

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

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

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

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

    .header-search {
        display: none;
    }
}

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

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

    .hero {
        height: 78vh;
        min-height: 560px;
    }

    .hero-content {
        left: 18px;
        bottom: 80px;
    }

    .hero-arrow {
        display: none;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .full-grid,
    .featured-grid,
    .ranking-grid,
    .ranking-grid.extended,
    .category-grid,
    .overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .detail-poster {
        max-width: 320px;
    }
}

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

    .logo-mark {
        width: 30px;
        height: 30px;
    }

    .logo {
        font-size: 17px;
    }

    .hero,
    .detail-hero {
        margin-top: 66px;
    }

    .page-hero {
        margin-top: 66px;
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .hero-summary {
        display: none;
    }

    .hero-actions {
        gap: 10px;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .section {
        padding: 52px 0;
    }

    .soft-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .movie-card.horizontal {
        grid-template-columns: 120px 1fr;
        min-height: 168px;
    }

    .movie-card.horizontal p,
    .movie-card.horizontal .tag-row {
        display: none;
    }

    .filter-box,
    .search-panel {
        display: grid;
    }

    .filter-box input,
    .filter-box select,
    .search-panel input,
    .search-panel select {
        min-width: 0;
        width: 100%;
    }
}
