:root {
    --sand-50: #faf8f3;
    --sand-100: #f5f0e6;
    --sand-200: #eadcc6;
    --sand-300: #d7bd91;
    --sand-400: #c9a876;
    --sand-600: #a17450;
    --sand-700: #885e40;
    --sand-800: #6f4d38;
    --sand-900: #5b4030;
    --desert-50: #fef9f0;
    --desert-500: #ec944f;
    --desert-600: #d97935;
    --desert-700: #b5602a;
    --ink: #2b211b;
    --white: #ffffff;
    --shadow-warm: 0 4px 20px rgba(236, 148, 79, 0.2);
    --shadow-soft: 0 18px 50px rgba(91, 64, 48, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, var(--sand-50) 0%, #ffffff 45%, var(--desert-50) 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--sand-50);
    background: linear-gradient(90deg, var(--sand-700), var(--desert-700));
    box-shadow: 0 16px 40px rgba(91, 64, 48, 0.28);
}

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark,
.footer-logo span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: rgba(236, 148, 79, 0.9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.mobile-link {
    padding: 9px 15px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

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

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
    border-radius: 10px;
}

.mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
}

.mobile-panel.open {
    display: grid;
    gap: 6px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: var(--sand-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 20%, rgba(236, 148, 79, 0.36), transparent 36%),
        linear-gradient(0deg, rgba(23, 16, 12, 0.94) 0%, rgba(23, 16, 12, 0.52) 48%, rgba(23, 16, 12, 0.15) 100%);
}

.hero-content {
    position: absolute;
    inset: auto 0 0;
    padding: 64px max(24px, calc((100vw - 1240px) / 2)) 86px;
}

.hero-copy {
    max-width: 780px;
    color: #fff;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--desert-500);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.hero p {
    max-width: 720px;
    margin: 0 0 22px;
    color: var(--sand-100);
    font-size: clamp(17px, 2.2vw, 22px);
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    color: var(--sand-900);
    background: var(--sand-100);
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #fff;
    background: rgba(217, 121, 53, 0.82);
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.movie-card:hover,
.feature-card:hover,
.category-tile:hover,
.category-card:hover,
.ranking-row:hover {
    transform: translateY(-3px);
}

.btn.primary {
    color: #fff;
    background: var(--desert-600);
    box-shadow: 0 10px 30px rgba(217, 121, 53, 0.35);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(217, 121, 53, 0.78);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: max(18px, calc((100vw - 1240px) / 2));
    transform: translateY(-50%);
}

.hero-next {
    right: max(18px, calc((100vw - 1240px) / 2));
    transform: translateY(-50%);
}

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

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

.hero-dot.active {
    width: 34px;
    background: var(--desert-500);
}

.home-search {
    margin-top: -42px;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 22px;
    align-items: center;
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.home-search h2,
.section-heading h2,
.page-hero h1,
.detail-card h1 {
    margin: 6px 0 0;
    color: var(--sand-900);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.home-search p,
.page-hero p {
    margin: 8px 0 0;
    color: var(--sand-700);
}

.filter-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 12px;
}

.filter-box input,
.filter-box select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(136, 94, 64, 0.18);
    border-radius: 14px;
    color: var(--sand-900);
    background: var(--white);
    outline: none;
}

.filter-box input {
    padding: 0 16px;
}

.filter-box select {
    padding: 0 12px;
}

.filter-box input:focus,
.filter-box select:focus {
    border-color: var(--desert-500);
    box-shadow: 0 0 0 4px rgba(236, 148, 79, 0.14);
}

.content-section {
    padding: 64px 0 0;
}

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

.compact-heading {
    margin-bottom: 18px;
}

.section-more {
    color: var(--desert-700);
    font-weight: 900;
}

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

.feature-card {
    display: grid;
    grid-template-columns: minmax(190px, 42%) 1fr;
    overflow: hidden;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow-warm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.feature-card:hover,
.movie-card:hover,
.category-card:hover,
.ranking-row:hover {
    box-shadow: var(--shadow-soft);
}

.feature-img {
    min-height: 300px;
    overflow: hidden;
}

.feature-img img,
.poster-wrap img,
.category-tile img,
.category-visual img,
.ranking-row img,
.side-poster img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.feature-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
}

.feature-copy span,
.small-meta {
    color: var(--desert-700);
    font-weight: 900;
}

.feature-copy h3,
.movie-card h3,
.category-info h2,
.ranking-row h2 {
    margin: 8px 0 10px;
    color: var(--sand-900);
    font-size: 24px;
    line-height: 1.22;
    font-weight: 900;
}

.feature-copy p,
.movie-card p,
.category-info p,
.ranking-row p {
    margin: 0;
    color: var(--sand-700);
}

.small-meta {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.small-meta em {
    font-style: normal;
    color: var(--sand-600);
}

.split-section {
    display: grid;
    grid-template-columns: 0.86fr 1.14fr;
    gap: 34px;
    padding-top: 72px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-list a {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    gap: 13px;
    padding: 14px 16px;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(91, 64, 48, 0.08);
}

.rank-list b,
.ranking-row b {
    color: var(--desert-600);
    font-size: 20px;
}

.rank-list span {
    font-weight: 900;
}

.rank-list em,
.ranking-row em {
    font-style: normal;
    color: var(--sand-900);
    font-weight: 900;
}

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

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 18px;
    border-radius: 22px;
    color: #fff;
    background: var(--sand-900);
    box-shadow: var(--shadow-warm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile::after,
.category-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(23, 16, 12, 0.84), rgba(23, 16, 12, 0.12));
}

.category-tile img,
.category-visual img {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.category-tile span,
.category-tile p,
.category-visual span {
    position: relative;
    z-index: 1;
}

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

.category-tile p {
    margin: 6px 0 0;
    color: var(--sand-100);
    font-size: 13px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(91, 64, 48, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card[hidden],
.ranking-row[hidden] {
    display: none;
}

.card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--sand-100);
}

.movie-card.compact .poster-wrap {
    aspect-ratio: 3 / 4;
}

.score-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    min-width: 44px;
    padding: 5px 8px;
    border-radius: 999px;
    color: #fff;
    background: rgba(217, 121, 53, 0.92);
    text-align: center;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.card-body {
    padding: 16px;
}

.movie-card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 8px;
    font-size: 18px;
}

.movie-card p {
    min-height: 46px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    color: var(--sand-600);
    font-size: 13px;
    font-weight: 800;
}

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

.page-hero {
    padding: 72px 0 34px;
}

.page-hero p {
    max-width: 780px;
    font-size: 18px;
}

.category-page-hero .filter-box,
.page-hero .filter-box {
    max-width: 720px;
    margin-top: 24px;
}

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

.category-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    overflow: hidden;
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow-warm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-visual {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    color: #fff;
}

.category-visual span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    font-size: 24px;
    font-weight: 900;
}

.category-info {
    padding: 24px;
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-links a {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--sand-900);
    background: var(--sand-100);
    font-size: 13px;
    font-weight: 800;
}

.ranking-board {
    display: grid;
    gap: 14px;
}

.ranking-row {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(91, 64, 48, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ranking-row a {
    display: grid;
    grid-template-columns: 70px 86px minmax(0, 1fr) 70px;
    gap: 18px;
    align-items: center;
    padding: 14px;
}

.ranking-row img {
    width: 86px;
    height: 112px;
    border-radius: 16px;
    background: var(--sand-100);
}

.ranking-row h2 {
    margin-top: 0;
    font-size: 22px;
}

.ranking-row span {
    display: inline-flex;
    margin-top: 10px;
    color: var(--sand-600);
    font-size: 14px;
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 28px 0 18px;
    color: var(--sand-600);
    font-size: 14px;
    font-weight: 800;
}

.breadcrumb a {
    color: var(--desert-700);
}

.breadcrumb em {
    font-style: normal;
    color: var(--sand-900);
}

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

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

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

.movie-video,
.player-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.movie-video {
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.18));
}

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

.play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--desert-600);
    box-shadow: 0 12px 32px rgba(217, 121, 53, 0.35);
    transform: translate(-50%, -50%);
    font-size: 30px;
}

.detail-card,
.side-panel {
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-warm);
}

.detail-card {
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 14px;
}

.detail-card h2,
.side-panel h2,
.site-footer h2 {
    margin: 26px 0 10px;
    color: var(--sand-900);
    font-size: 22px;
    font-weight: 900;
}

.detail-card p {
    margin: 0;
    color: var(--sand-700);
    font-size: 17px;
}

.detail-tags {
    margin: 6px 0 12px;
}

.detail-side {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 18px;
}

.side-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: 24px;
    color: #fff;
    background: var(--sand-900);
    box-shadow: var(--shadow-soft);
}

.side-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(23, 16, 12, 0.78), transparent 52%);
}

.side-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 1;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(217, 121, 53, 0.86);
    font-weight: 900;
}

.side-panel {
    padding: 22px;
}

.side-panel h2 {
    margin-top: 0;
}

.side-panel dl {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px 14px;
    margin: 0;
}

.side-panel dt {
    color: var(--sand-600);
    font-weight: 900;
}

.side-panel dd {
    margin: 0;
    color: var(--sand-900);
    font-weight: 800;
}

.related-section {
    padding-top: 46px;
}

.site-footer {
    margin-top: 76px;
    color: var(--sand-200);
    background: linear-gradient(90deg, var(--sand-800), var(--sand-900));
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 44px;
    padding: 42px 0;
}

.footer-logo {
    color: var(--sand-50);
    font-size: 20px;
}

.site-footer p {
    margin: 14px 0 0;
    color: var(--sand-300);
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--sand-50);
    font-size: 16px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--sand-100);
    background: rgba(255, 255, 255, 0.08);
}

.copyright {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid rgba(245, 240, 230, 0.13);
    text-align: center;
    font-size: 14px;
}

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

    .feature-grid,
    .split-section,
    .category-overview,
    .detail-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
        grid-template-columns: 260px 1fr;
    }
}

@media (max-width: 760px) {
    .container,
    .nav-shell,
    .mobile-panel,
    .footer-inner,
    .copyright {
        width: min(100% - 24px, 1240px);
    }

    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

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

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

    .hero-content {
        padding: 42px 22px 78px;
    }

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

    .hero-arrow {
        display: none;
    }

    .home-search {
        grid-template-columns: 1fr;
        margin-top: -28px;
        padding: 20px;
    }

    .filter-box {
        grid-template-columns: 1fr;
    }

    .feature-card,
    .category-card,
    .ranking-row a,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .feature-img {
        min-height: 240px;
    }

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

    .ranking-row a {
        position: relative;
    }

    .ranking-row b {
        position: absolute;
        top: 18px;
        left: 18px;
        z-index: 2;
        min-width: 44px;
        padding: 5px 8px;
        border-radius: 999px;
        color: #fff;
        background: var(--desert-600);
        text-align: center;
    }

    .ranking-row img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

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

@media (max-width: 480px) {
    .category-grid,
    .category-grid.small,
    .movie-grid,
    .category-movie-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-card {
        padding: 22px;
    }
}
