:root {
    --ash-50: #f8f7f6;
    --ash-100: #efedeb;
    --ash-200: #dfd9d4;
    --ash-500: #766d68;
    --ash-700: #4a4441;
    --ash-900: #2e2926;
    --fire-300: #ffbd70;
    --fire-400: #ff9636;
    --fire-600: #f05d00;
    --fire-700: #c74400;
    --ember-600: #b73527;
    --ember-700: #ad3427;
    --forest-50: #f1f5f0;
    --forest-100: #e3e9e3;
    --forest-600: #475e47;
    --forest-700: #3a4c3a;
    --ink: #1d1917;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
    --shadow-md: 0 10px 24px rgba(46, 41, 38, .10);
    --shadow-lg: 0 24px 60px rgba(46, 41, 38, .18);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ash-700);
    background: var(--ash-50);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(248, 247, 246, .84);
    border-bottom: 1px solid rgba(223, 217, 212, .72);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 74px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--ash-900);
    letter-spacing: .02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--white);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--fire-600), var(--ember-600));
    box-shadow: 0 12px 28px rgba(240, 93, 0, .28);
}

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

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--ash-700);
    font-weight: 700;
    transition: color .25s ease, background .25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--fire-700);
    background: rgba(240, 93, 0, .10);
}

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

.header-search input,
.mobile-search input,
.hero-search input,
.inline-search input {
    width: 100%;
    border: 1px solid var(--ash-200);
    border-radius: 999px;
    color: var(--ash-900);
    background: rgba(255, 255, 255, .90);
    outline: none;
    transition: border .25s ease, box-shadow .25s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.inline-search input:focus {
    border-color: var(--fire-400);
    box-shadow: 0 0 0 4px rgba(240, 93, 0, .13);
}

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

.header-search button,
.mobile-search button,
.hero-search button,
.inline-search button {
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: var(--fire-600);
    font-weight: 800;
    padding: 10px 18px;
    white-space: nowrap;
    transition: transform .25s ease, background .25s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.inline-search button:hover,
.primary-button:hover {
    background: var(--fire-700);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--ash-900);
    border-radius: 2px;
}

.mobile-panel {
    border-top: 1px solid var(--ash-200);
    padding: 16px 18px 22px;
    background: var(--ash-50);
}

.mobile-nav {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.hero {
    position: relative;
    min-height: 690px;
    color: var(--white);
    background: var(--ink);
    overflow: hidden;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 48px;
    align-items: center;
    padding: 90px max(18px, calc((100vw - 1180px) / 2)) 130px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity .7s ease, transform .7s ease;
    pointer-events: none;
}

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

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--fire-300);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 0;
    color: var(--white);
    font-size: clamp(42px, 7vw, 84px);
    line-height: .98;
    letter-spacing: -.06em;
    max-width: 780px;
}

.hero-copy p {
    max-width: 700px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, .88);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-meta,
.card-meta,
.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tags {
    margin: 24px 0 30px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, .16);
    backdrop-filter: blur(6px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-button,
.secondary-button,
.text-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform .25s ease, background .25s ease, color .25s ease;
}

.primary-button {
    color: var(--white);
    background: var(--fire-600);
    padding: 13px 24px;
    box-shadow: 0 18px 35px rgba(240, 93, 0, .30);
}

.secondary-button {
    color: var(--white);
    padding: 12px 22px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 35px 80px rgba(0, 0, 0, .42);
    aspect-ratio: 3 / 4;
    background: var(--ash-900);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    color: var(--white);
    font-weight: 900;
    text-shadow: 0 3px 14px rgba(0, 0, 0, .55);
}

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

.hero-arrow,
.hero-dot {
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, .16);
    backdrop-filter: blur(8px);
}

.hero-arrow {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    transition: width .25s ease, background .25s ease;
}

.hero-dot.is-active {
    width: 28px;
    background: var(--fire-400);
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 6;
    width: min(760px, calc(100% - 36px));
    padding: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(16px);
}

.hero-search input {
    padding: 14px 18px;
}

.section {
    padding: 68px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-article h2,
.detail-side h2 {
    margin: 0;
    color: var(--ash-900);
    line-height: 1.1;
    letter-spacing: -.03em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 44px);
}

.section-link,
.text-button {
    color: var(--fire-700);
    background: rgba(240, 93, 0, .10);
    padding: 10px 16px;
}

.section-link:hover,
.text-button:hover {
    color: var(--white);
    background: var(--fire-600);
}

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

.category-tile {
    display: grid;
    align-content: start;
    min-height: 190px;
    padding: 24px;
    border-radius: var(--radius-md);
    color: var(--ash-900);
    background: linear-gradient(140deg, var(--white), var(--forest-50));
    box-shadow: var(--shadow-md);
    transition: transform .25s ease, box-shadow .25s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-card-large:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 10px 0 16px;
    color: var(--ash-700);
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.category-samples a {
    color: var(--forest-700);
    font-size: 12px;
    font-weight: 800;
    background: var(--forest-100);
    border-radius: 999px;
    padding: 5px 9px;
}

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

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

.latest-grid,
.catalog-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform .25s ease, box-shadow .25s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--ash-900);
}

.featured-grid .poster-link {
    aspect-ratio: 16 / 10;
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(0, 0, 0, .70), transparent);
}

.play-pill {
    position: absolute;
    right: 12px;
    bottom: 12px;
    color: var(--white);
    background: var(--fire-600);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    color: var(--white);
    background: linear-gradient(135deg, var(--fire-600), var(--ember-600));
    border-radius: 12px;
    font-weight: 900;
}

.card-content {
    padding: 16px;
}

.card-meta {
    color: var(--ash-500);
    font-size: 12px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: var(--ash-900);
    font-size: 18px;
    line-height: 1.25;
}

.movie-card p {
    margin: 0;
    color: var(--ash-700);
    font-size: 14px;
}

.card-tags {
    margin-top: 12px;
}

.card-tags span,
.detail-tags span {
    color: var(--forest-700);
    background: var(--forest-100);
}

.movie-card.compact .card-content {
    padding: 13px;
}

.movie-card.compact h3 {
    font-size: 16px;
}

.movie-card.compact p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-band {
    background: linear-gradient(135deg, var(--ash-900), #3d2d25 50%, var(--forest-700));
    color: var(--white);
}

.ranking-inner {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 30px;
    align-items: start;
}

.ranking-copy h2,
.ranking-copy p {
    color: var(--white);
}

.ranking-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(32px, 4vw, 50px);
}

.ranking-copy p {
    margin: 0 0 24px;
    color: rgba(255, 255, 255, .82);
}

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

.ranking-list .movie-card {
    background: rgba(255, 255, 255, .94);
}

.page-main {
    padding-bottom: 72px;
}

.page-hero {
    padding: 76px 0 38px;
}

.page-hero h1 {
    font-size: clamp(36px, 6vw, 64px);
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--ash-700);
    font-size: 18px;
}

.category-hero {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 28px;
    align-items: end;
}

.inline-search {
    padding: 10px;
    border-radius: 999px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.inline-search input {
    padding: 13px 16px;
}

.filter-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.filter-strip button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--ash-700);
    background: var(--white);
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}

.filter-strip button.active,
.filter-strip button:hover {
    color: var(--white);
    background: var(--forest-600);
}

.category-overview {
    display: grid;
    gap: 22px;
}

.category-card-large {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: center;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform .25s ease, box-shadow .25s ease;
}

.category-poster-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.category-poster-stack img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: var(--ash-200);
}

.category-card-large h2 {
    margin: 0 0 10px;
    color: var(--ash-900);
    font-size: 30px;
}

.category-card-large p {
    margin: 0 0 18px;
}

.detail-main {
    background: var(--ash-50);
}

.detail-hero {
    color: var(--white);
    background-size: cover;
    background-position: center;
}

.detail-hero-inner {
    padding: 52px 0 64px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 34px;
    align-items: end;
}

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

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

.detail-copy h1 {
    color: var(--white);
    font-size: clamp(38px, 6vw, 70px);
}

.detail-one-line {
    max-width: 780px;
    margin: 18px 0 22px;
    color: rgba(255, 255, 255, .88);
    font-size: 19px;
}

.detail-meta span {
    color: var(--white);
    background: rgba(255, 255, 255, .14);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

.detail-tags {
    margin-top: 16px;
}

.player-section {
    margin-top: -34px;
    position: relative;
    z-index: 3;
}

.player-card {
    padding: 12px;
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.player {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #050505;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle at center, rgba(0, 0, 0, .12), rgba(0, 0, 0, .48));
    transition: opacity .25s ease, visibility .25s ease;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    padding-left: 6px;
    border-radius: 50%;
    font-size: 34px;
    background: linear-gradient(135deg, var(--fire-600), var(--ember-600));
    box-shadow: 0 20px 45px rgba(0, 0, 0, .35);
}

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

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding-top: 46px;
}

.detail-article,
.detail-side {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.detail-article {
    padding: 34px;
}

.detail-article h2,
.detail-side h2 {
    font-size: 28px;
    margin-bottom: 14px;
}

.detail-article p {
    margin: 0 0 26px;
    color: var(--ash-700);
    font-size: 17px;
}

.detail-article p:last-child {
    margin-bottom: 0;
}

.detail-side {
    padding: 26px;
    align-self: start;
}

.detail-side dl {
    margin: 0;
}

.detail-side dl div {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--ash-100);
}

.detail-side dt {
    color: var(--ash-500);
    font-weight: 800;
}

.detail-side dd {
    margin: 0;
    color: var(--ash-900);
    font-weight: 700;
}

.site-footer {
    color: rgba(255, 255, 255, .82);
    background: var(--ash-900);
    padding: 38px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-logo {
    color: var(--white);
}

.footer-inner p {
    margin: 0;
}

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

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

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

@media (max-width: 1120px) {
    .header-search {
        display: none;
    }

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

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

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

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding-top: 88px;
    }

    .hero-poster {
        width: min(230px, 62vw);
    }

    .hero h1,
    .hero h2 {
        font-size: clamp(40px, 13vw, 70px);
    }

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

    .ranking-inner,
    .category-hero,
    .category-card-large,
    .detail-layout,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(260px, 70vw);
    }

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 28px, 1180px);
    }

    .header-inner {
        min-height: 66px;
    }

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

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

    .hero-slide {
        padding-bottom: 160px;
    }

    .hero-search,
    .inline-search {
        border-radius: 24px;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-controls {
        bottom: 104px;
    }

    .section {
        padding: 46px 0;
    }

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

    .category-grid,
    .movie-grid,
    .featured-grid,
    .latest-grid,
    .catalog-grid,
    .ranking-list {
        grid-template-columns: 1fr;
    }

    .movie-card.compact {
        display: grid;
        grid-template-columns: 110px 1fr;
    }

    .movie-card.compact .poster-link {
        height: 100%;
    }

    .category-poster-stack {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-article,
    .detail-side {
        padding: 22px;
    }
}
