* {
    box-sizing: border-box;
}

:root {
    --primary-50: #fbf7f0;
    --primary-100: #f4e7d4;
    --primary-500: #b8915a;
    --primary-600: #a67c4a;
    --primary-700: #8a6640;
    --secondary-50: #f6f5ef;
    --secondary-600: #6b6a56;
    --accent-50: #fff7ed;
    --accent-500: #e3a65a;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 20px rgba(41, 37, 36, 0.08);
    --shadow-xl: 0 24px 50px rgba(41, 37, 36, 0.16);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
    background: var(--neutral-50);
    color: var(--neutral-800);
    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(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--neutral-200);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--neutral-900);
    font-weight: 800;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
    color: #fff;
    font-size: 14px;
    box-shadow: 0 10px 18px rgba(166, 124, 74, 0.25);
}

.logo-text {
    display: grid;
    line-height: 1.2;
}

.logo-text strong {
    font-size: 20px;
}

.logo-text em {
    font-style: normal;
    color: var(--neutral-500);
    font-size: 12px;
    font-weight: 500;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link,
.mobile-nav-link {
    color: var(--neutral-700);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 0;
    border-radius: 10px;
    background: var(--neutral-100);
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--neutral-700);
}

.mobile-nav {
    display: none;
    padding: 0 16px 14px;
    border-top: 1px solid var(--neutral-200);
    background: #fff;
}

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

.mobile-nav-link {
    padding: 12px 0;
}

.hero-section {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-100), var(--secondary-50), var(--accent-50));
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    filter: saturate(1.12);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #fff 0%, rgba(255, 255, 255, 0.78) 42%, rgba(255, 255, 255, 0.3) 100%);
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 48px;
    align-items: center;
    min-height: 70vh;
    padding: 80px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--primary-600);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1 {
    margin: 0 0 22px;
    color: var(--neutral-900);
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-desc,
.page-hero p {
    max-width: 760px;
    margin: 0 0 28px;
    color: var(--neutral-700);
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.detail-meta span,
.movie-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--neutral-700);
    font-size: 13px;
    font-weight: 600;
}

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

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

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

.btn.primary {
    background: var(--primary-600);
    color: #fff;
    box-shadow: 0 12px 28px rgba(166, 124, 74, 0.28);
}

.btn.primary:hover {
    background: var(--primary-700);
    box-shadow: 0 18px 36px rgba(166, 124, 74, 0.34);
}

.btn.ghost {
    border: 1px solid rgba(166, 124, 74, 0.28);
    background: rgba(255, 255, 255, 0.72);
    color: var(--primary-700);
}

.btn.ghost.dark {
    background: #fff;
}

.btn.text {
    color: var(--primary-700);
}

.hero-panel {
    display: grid;
    gap: 18px;
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    background: var(--neutral-200);
    box-shadow: var(--shadow-xl);
}

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

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

.hero-poster span,
.play-chip {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-600);
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-md);
}

.hero-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.compact-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-stack .compact-card {
    grid-template-columns: 1fr;
}

.compact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.compact-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    background: var(--neutral-200);
}

.compact-card span {
    display: none;
}

.compact-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--neutral-900);
    font-size: 14px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-card em {
    display: block;
    overflow: hidden;
    color: var(--neutral-500);
    font-size: 12px;
    font-style: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.content-section {
    padding: 72px 0;
    background: #fff;
}

.content-section.soft-bg {
    background: linear-gradient(135deg, var(--secondary-50), var(--primary-50));
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 28px;
}

.section-icon {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 900;
}

.section-heading h2 {
    margin: 0;
    color: var(--neutral-900);
    font-size: 30px;
    line-height: 1.2;
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--neutral-600);
}

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

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

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

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

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--neutral-200);
}

.movie-card.small .movie-cover {
    aspect-ratio: 4 / 3;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 65%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .cover-shade {
    opacity: 1;
}

.play-chip {
    width: 50px;
    height: 50px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
    color: #fff;
    font-weight: 900;
    box-shadow: var(--shadow-md);
}

.movie-body {
    padding: 16px;
}

.movie-body h3 {
    display: -webkit-box;
    min-height: 2.8em;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--neutral-900);
    font-size: 17px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-body h3 a:hover {
    color: var(--primary-600);
}

.movie-body p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--neutral-600);
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    gap: 6px;
    margin-bottom: 10px;
}

.movie-meta span,
.tag-row span {
    background: var(--neutral-100);
    color: var(--neutral-600);
    font-size: 12px;
}

.tag-row.large span {
    font-size: 13px;
}

.movie-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 20px;
    scroll-snap-type: x proximity;
}

.rail-item {
    width: 320px;
    min-width: 320px;
    scroll-snap-align: start;
}

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

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

.category-tile {
    position: relative;
    display: flex;
    min-height: 180px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--neutral-200);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

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

.category-tile span {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(28, 25, 23, 0.84), rgba(28, 25, 23, 0.28));
}

.category-tile div {
    position: relative;
    align-self: flex-end;
    padding: 18px;
    color: #fff;
}

.category-tile strong {
    display: block;
    margin-bottom: 6px;
    font-size: 22px;
}

.category-tile em {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    font-style: normal;
    opacity: 0.86;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.review-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.review-cover {
    overflow: hidden;
    border-radius: 16px;
    background: var(--neutral-200);
}

.review-cover img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
}

.review-card h3 {
    margin: 0 0 10px;
    color: var(--neutral-900);
    font-size: 20px;
}

.review-card p {
    display: -webkit-box;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--neutral-600);
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.inline-link {
    color: var(--primary-600);
    font-weight: 800;
}

.page-hero {
    padding: 78px 0;
    background: linear-gradient(135deg, var(--primary-100), var(--secondary-50), #fff);
}

.page-hero.mini-hero,
.page-hero.category-hero {
    border-bottom: 1px solid var(--neutral-200);
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--neutral-200);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.filter-search {
    display: flex;
    gap: 12px;
}

.filter-search input,
.filter-selects select {
    width: 100%;
    border: 1px solid var(--neutral-300);
    border-radius: 14px;
    background: #fff;
    color: var(--neutral-800);
    outline: none;
}

.filter-search input {
    min-height: 48px;
    padding: 0 16px;
}

.filter-search input:focus,
.filter-selects select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(184, 145, 90, 0.15);
}

.filter-search button {
    min-width: 92px;
    border: 0;
    border-radius: 14px;
    background: var(--primary-600);
    color: #fff;
    font-weight: 800;
}

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

.filter-selects label {
    display: grid;
    gap: 6px;
    color: var(--neutral-600);
    font-size: 13px;
    font-weight: 700;
}

.filter-selects select {
    min-height: 42px;
    padding: 0 12px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 132px minmax(0, 1fr) 64px;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 14px;
    background: var(--neutral-200);
}

.rank-thumb img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.rank-main h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-main p {
    display: -webkit-box;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--neutral-600);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.score {
    color: var(--primary-600);
    font-size: 24px;
}

.top-rank-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.top-rank-card {
    position: relative;
    min-height: 280px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--neutral-200);
    box-shadow: var(--shadow-md);
}

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

.top-rank-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.16));
}

.top-rank-card span,
.top-rank-card div {
    position: absolute;
    z-index: 1;
}

.top-rank-card span {
    left: 16px;
    top: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-700);
    font-weight: 900;
}

.top-rank-card div {
    left: 18px;
    right: 18px;
    bottom: 18px;
    color: #fff;
}

.top-rank-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.top-rank-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    opacity: 0.86;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.detail-shell {
    padding: 28px 0 72px;
}

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

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

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

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

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.player-wrap {
    position: relative;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
}

.player-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.65));
}

.player-cover strong {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-600);
    font-size: 30px;
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-xl);
}

.detail-card {
    padding: 26px;
}

.detail-card h1 {
    margin: 0 0 16px;
    color: var(--neutral-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
}

.detail-card h2,
.side-card h2 {
    margin: 26px 0 12px;
    color: var(--neutral-900);
    font-size: 22px;
}

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

.lead-text {
    margin-top: 22px;
    font-weight: 700;
}

.review-box {
    margin-top: 24px;
    padding: 22px;
    border-radius: 18px;
    background: var(--primary-50);
}

.sticky-side {
    position: sticky;
    top: 84px;
}

.side-card {
    padding: 18px;
}

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

.side-list {
    display: grid;
    gap: 12px;
}

.site-footer {
    background: var(--neutral-900);
    color: rgba(255, 255, 255, 0.78);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

.footer-logo {
    color: #fff;
    font-size: 22px;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 16px;
}

.site-footer p {
    max-width: 420px;
    margin: 12px 0 0;
}

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

.footer-links a:hover {
    color: var(--primary-500);
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
}

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

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

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

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

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

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

    .main-nav {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .hero-section,
    .hero-inner {
        min-height: auto;
    }

    .hero-inner {
        padding: 56px 0;
    }

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

    .movie-grid,
    .featured-grid,
    .ranking-grid,
    .compact-grid,
    .search-grid,
    .category-grid,
    .category-grid.wide,
    .review-grid,
    .top-rank-grid,
    .footer-grid,
    .filter-selects {
        grid-template-columns: 1fr;
    }

    .review-card,
    .rank-row {
        grid-template-columns: 1fr;
    }

    .rank-number {
        width: 38px;
        height: 38px;
    }

    .rank-thumb img {
        aspect-ratio: 16 / 9;
    }

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

    .rail-item {
        width: 78vw;
        min-width: 78vw;
    }

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

    .page-hero {
        padding: 52px 0;
    }
}
