:root {
    --ancient-50: #f9f7f4;
    --ancient-100: #f0ebe3;
    --ancient-200: #e4dac8;
    --ancient-300: #d4c3a4;
    --ancient-600: #a67f4d;
    --ancient-700: #8b6a40;
    --ancient-900: #5f4930;
    --sage-50: #f4f6f2;
    --sage-100: #e4eadf;
    --sage-600: #505c50;
    --sage-700: #424a42;
    --earth-50: #f7f4ef;
    --earth-100: #edeae5;
    --earth-400: #a39684;
    --earth-600: #79685a;
    --earth-700: #64544a;
    --earth-800: #554840;
    --earth-900: #4a3f38;
    --white: #ffffff;
    --shadow-sm: 0 6px 18px rgba(74, 63, 56, 0.08);
    --shadow-lg: 0 24px 60px rgba(74, 63, 56, 0.18);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--earth-900);
    background: var(--ancient-50);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(212, 195, 164, 0.65);
    background: rgba(249, 247, 244, 0.95);
    backdrop-filter: blur(14px);
}

.nav-shell {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    color: var(--earth-900);
    white-space: nowrap;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--ancient-600), var(--sage-600));
    box-shadow: var(--shadow-sm);
}

.brand-text {
    font-size: 18px;
    letter-spacing: 0.04em;
}

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

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--earth-700);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--ancient-900);
    background: var(--ancient-100);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--ancient-200);
    border-radius: 999px;
    background: var(--white);
}

.nav-search input {
    width: 190px;
    border: 0;
    outline: none;
    padding: 8px 10px;
    background: transparent;
    color: var(--earth-900);
}

.nav-search button,
.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-search button,
.primary-btn {
    border: 0;
    color: var(--white);
    background: var(--ancient-600);
    box-shadow: var(--shadow-sm);
}

.nav-search button {
    min-height: 36px;
    padding: 0 16px;
}

.primary-btn,
.ghost-btn {
    min-height: 46px;
    padding: 0 22px;
}

.primary-btn:hover,
.nav-search button:hover {
    transform: translateY(-1px);
    background: var(--ancient-700);
    box-shadow: var(--shadow-lg);
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
}

.ghost-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.28);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--ancient-200);
    border-radius: 14px;
    background: var(--white);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: var(--earth-900);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--ancient-200);
    background: var(--ancient-50);
}

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

.mobile-nav-inner {
    display: grid;
    gap: 12px;
    padding: 14px 0 18px;
}

.mobile-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-category-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--white);
    color: var(--earth-700);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide::before,
.page-hero::before,
.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(2px) saturate(0.95);
    transform: scale(1.04);
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(42, 32, 25, 0.9), rgba(74, 63, 56, 0.66) 48%, rgba(74, 63, 56, 0.36));
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.55fr);
    gap: 56px;
    align-items: center;
    padding: 96px 0 72px;
}

.hero-copy {
    color: var(--white);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--ancient-900);
    background: var(--ancient-100);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy .eyebrow,
.page-hero .eyebrow,
.detail-copy .eyebrow {
    color: var(--ancient-100);
    background: rgba(255, 255, 255, 0.18);
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.18;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    max-width: 760px;
    font-size: clamp(38px, 7vw, 76px);
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-line {
    max-width: 720px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(18px, 2vw, 22px);
}

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

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

.hero-tags span,
.meta-pills span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

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

.hero-poster {
    display: block;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.24);
    border-radius: 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-50%);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dots button.is-active {
    background: var(--white);
}

.search-landing {
    margin-top: -42px;
    position: relative;
    z-index: 10;
}

.big-search {
    display: grid;
    grid-template-columns: 1fr minmax(240px, 460px) auto;
    gap: 18px;
    align-items: center;
    padding: 24px;
    border: 1px solid var(--ancient-200);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-lg);
}

.big-search h2 {
    font-size: 26px;
}

.big-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--ancient-200);
    border-radius: 999px;
    outline: none;
    padding: 0 16px;
    color: var(--earth-900);
    background: var(--white);
}

.page-section {
    padding: 72px 0 0;
}

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

.section-head h2 {
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-head p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--earth-600);
}

.section-link,
.text-link {
    color: var(--ancient-700);
    font-weight: 800;
}

.section-link:hover,
.text-link:hover {
    color: var(--ancient-900);
}

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

.category-card,
.category-overview-card {
    min-height: 168px;
    padding: 22px;
    border: 1px solid var(--ancient-200);
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span,
.category-title {
    display: block;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 900;
}

.category-card strong,
.category-overview-card p {
    color: var(--earth-600);
    font-weight: 500;
}

.accent-ancient {
    background: linear-gradient(135deg, var(--white), var(--ancient-100));
}

.accent-sage {
    background: linear-gradient(135deg, var(--white), var(--sage-100));
}

.accent-earth {
    background: linear-gradient(135deg, var(--white), var(--earth-100));
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--ancient-200);
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--earth-100);
}

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

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(8px);
}

.badge-year {
    left: 12px;
}

.badge-type {
    right: 12px;
}

.card-body {
    padding: 16px;
}

.card-meta {
    margin-bottom: 8px;
    color: var(--earth-400);
    font-size: 13px;
    font-weight: 700;
}

.card-body h3,
.rank-copy h3 {
    font-size: 20px;
    font-weight: 900;
}

.card-body h3 a:hover,
.rank-copy h3 a:hover {
    color: var(--ancient-700);
}

.card-body p,
.rank-copy p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 3.2em;
    margin: 10px 0 14px;
    color: var(--earth-600);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-list span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--ancient-700);
    background: var(--ancient-100);
    font-size: 12px;
    font-weight: 700;
}

.compact .card-body h3 {
    font-size: 17px;
}

.compact .card-body p {
    min-height: 0;
}

.rank-list {
    display: grid;
    gap: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 64px 86px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: var(--white);
    background: var(--ancient-600);
    font-size: 20px;
    font-weight: 900;
}

.rank-thumb img {
    width: 86px;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    object-fit: cover;
}

.full-rank-list .rank-row {
    grid-template-columns: 70px 96px 1fr auto;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--earth-900);
}

.small-hero {
    padding: 92px 0 82px;
}

.category-hero {
    padding: 82px 0 86px;
}

.page-hero .container,
.detail-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero p,
.detail-copy p {
    max-width: 740px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 220px 220px;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--ancient-200);
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.filter-bar label {
    display: grid;
    gap: 8px;
    color: var(--earth-700);
    font-weight: 800;
}

.detail-hero {
    min-height: 620px;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 46px;
    align-items: center;
    padding: 84px 0;
}

.detail-poster {
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.22);
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
}

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

.meta-pills {
    margin-top: 24px;
}

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

.detail-main,
.detail-aside {
    display: grid;
    gap: 22px;
    height: fit-content;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #111;
    box-shadow: var(--shadow-lg);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-cover-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.22));
}

.play-orb {
    position: relative;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    color: var(--ancient-900);
    background: rgba(255, 255, 255, 0.92);
    font-size: 34px;
    line-height: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

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

.content-card,
.aside-card {
    padding: 26px;
    border: 1px solid var(--ancient-200);
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.content-card h2,
.aside-card h2 {
    margin-bottom: 14px;
    font-size: 26px;
    font-weight: 900;
}

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

.aside-card dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.aside-card div {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
}

.aside-card dt {
    color: var(--earth-400);
    font-weight: 800;
}

.aside-card dd {
    margin: 0;
    color: var(--earth-800);
}

.aside-card .text-link {
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.category-samples a {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--earth-700);
    background: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 700;
}

.site-footer {
    margin-top: 84px;
    padding: 58px 0 30px;
    color: var(--earth-100);
    background: var(--earth-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 36px;
}

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

.site-footer p {
    max-width: 520px;
    color: rgba(237, 234, 229, 0.75);
}

.site-footer h3 {
    margin-bottom: 12px;
    color: var(--ancient-300);
    font-size: 16px;
}

.site-footer a:not(.brand) {
    display: inline-flex;
    margin: 0 10px 10px 0;
    color: rgba(237, 234, 229, 0.72);
}

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

.footer-bottom {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid rgba(237, 234, 229, 0.16);
    color: rgba(237, 234, 229, 0.58);
}

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

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

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

    .hero-content,
    .detail-hero-grid,
    .detail-layout,
    .big-search,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-poster {
        max-width: 260px;
    }

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

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

    .rank-row,
    .full-rank-list .rank-row {
        grid-template-columns: 52px 72px 1fr;
    }

    .rank-row .text-link {
        grid-column: 3;
        justify-content: flex-start;
    }
}

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

    .hero-carousel {
        min-height: 78vh;
    }

    .hero-content {
        padding: 72px 0 82px;
        gap: 28px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 38px;
    }

    .hero-control {
        display: none;
    }

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

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

    .detail-hero-grid {
        padding: 58px 0;
    }

    .rank-row,
    .full-rank-list .rank-row {
        grid-template-columns: 46px 64px 1fr;
        gap: 10px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}
