:root {
    --color-sand-50: #faf8f3;
    --color-sand-100: #f5f0e6;
    --color-sand-200: #ebe2cd;
    --color-sand-300: #ddc9a3;
    --color-sand-400: #d4b683;
    --color-sand-500: #c49a5c;
    --color-sand-600: #b07d44;
    --color-sand-700: #8f6235;
    --color-sand-800: #6d4a29;
    --color-sand-900: #4a3218;
    --color-dune-50: #fdf6ed;
    --color-dune-100: #fae9d1;
    --color-dune-200: #f5d4a3;
    --color-dune-300: #ebb76a;
    --color-dune-400: #e19838;
    --color-dune-500: #d97c1e;
    --color-dune-600: #c05f14;
    --color-dune-700: #9c4613;
    --color-dune-800: #7d3714;
    --color-dune-900: #642d13;
    --shadow-card: 0 16px 35px rgba(74, 50, 24, 0.12);
    --shadow-soft: 0 10px 24px rgba(74, 50, 24, 0.09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-sand-50);
    color: var(--color-sand-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 10%, rgba(217, 124, 30, 0.16), transparent 28%),
        radial-gradient(circle at 90% 5%, rgba(196, 154, 92, 0.22), transparent 30%),
        linear-gradient(180deg, #fffaf0 0%, var(--color-sand-50) 46%, #fff 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(221, 201, 163, 0.65);
    backdrop-filter: blur(12px);
}

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--color-dune-700);
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-dune-500), var(--color-dune-700));
    box-shadow: 0 10px 18px rgba(217, 124, 30, 0.24);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--color-sand-700);
    font-weight: 600;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--color-dune-600);
}

.header-search {
    margin-left: auto;
    width: min(280px, 26vw);
}

.header-search input,
.list-toolbar input {
    width: 100%;
    border: 1px solid var(--color-sand-200);
    border-radius: 999px;
    background: #fff;
    color: var(--color-sand-900);
    padding: 11px 16px;
    outline: none;
    box-shadow: 0 3px 12px rgba(74, 50, 24, 0.05);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.header-search input:focus,
.list-toolbar input:focus {
    border-color: var(--color-dune-400);
    box-shadow: 0 0 0 4px rgba(217, 124, 30, 0.12);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--color-sand-100);
    padding: 9px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--color-sand-800);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 10px 24px 18px;
    background: #fff;
    border-top: 1px solid var(--color-sand-200);
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    padding: 10px 0;
    color: var(--color-sand-700);
    font-weight: 700;
}

.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--color-sand-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transform: scale(1.015);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(32, 21, 10, 0.92) 0%, rgba(54, 34, 12, 0.7) 45%, rgba(54, 34, 12, 0.2) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    min-height: 620px;
    padding: 118px 24px 100px;
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--color-dune-500);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.hero-content .eyebrow {
    color: var(--color-dune-200);
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-summary {
    max-width: 620px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    backdrop-filter: blur(6px);
}

.tag-row span {
    background: var(--color-dune-50);
    color: var(--color-dune-700);
}

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

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

.btn-primary {
    min-height: 46px;
    padding: 0 22px;
    background: var(--color-dune-500);
    color: #fff;
    box-shadow: 0 12px 24px rgba(217, 124, 30, 0.26);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--color-dune-600);
    box-shadow: 0 16px 30px rgba(217, 124, 30, 0.35);
}

.btn-ghost {
    min-height: 46px;
    padding: 0 20px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.12);
}

.btn-ghost.dark {
    color: var(--color-sand-800);
    border-color: var(--color-sand-300);
    background: #fff;
}

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

.text-link {
    color: var(--color-dune-600);
}

.text-link:hover {
    color: var(--color-dune-800);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    font-size: 34px;
    line-height: 1;
    backdrop-filter: blur(8px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    padding: 0;
}

.hero-dots button.active {
    width: 36px;
    background: #fff;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 28px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1,
.story-card h2 {
    margin: 0;
    color: var(--color-sand-900);
    line-height: 1.15;
}

.section-heading h2 {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.section-heading p:not(.eyebrow),
.page-hero p,
.movie-desc,
.rank-item p,
.story-card p,
.site-footer p,
.detail-line {
    color: var(--color-sand-700);
    line-height: 1.75;
}

.row-heading {
    max-width: none;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.highlight-band {
    padding-top: 64px;
}

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

.category-tile,
.card,
.rank-panel,
.watch-panel,
.story-card {
    border: 1px solid rgba(221, 201, 163, 0.78);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(8px);
}

.category-tile {
    min-height: 142px;
    padding: 24px;
    border-radius: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover,
.card:hover,
.compact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
    border-color: var(--color-dune-300);
}

.category-tile span {
    display: block;
    color: var(--color-dune-700);
    font-size: 1.18rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.category-tile p {
    margin: 0;
    color: var(--color-sand-700);
    line-height: 1.6;
}

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

.card {
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--color-sand-200), var(--color-dune-100));
}

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

.card:hover .poster-wrap img,
.compact-card:hover img,
.rank-cover:hover img {
    transform: scale(1.06);
}

.poster-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(74, 50, 24, 0.72);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

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

.movie-meta {
    margin: 0 0 8px;
    color: var(--color-sand-600);
    font-size: 0.84rem;
    font-weight: 700;
}

.movie-card h3,
.rank-item h3 {
    margin: 0 0 9px;
    color: var(--color-sand-900);
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-item h3 a:hover {
    color: var(--color-dune-600);
}

.movie-desc {
    min-height: 52px;
    margin: 0 0 14px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: start;
}

.rank-panel,
.watch-panel,
.story-card {
    border-radius: 26px;
    padding: 24px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--color-sand-100);
}

.rank-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: var(--color-sand-100);
}

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

.rank-cover span {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--color-dune-500);
    color: #fff;
    font-weight: 900;
}

.rank-item p {
    margin: 0;
}

.full-button {
    width: 100%;
    margin-top: 18px;
}

.compact-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.compact-card {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--color-sand-200);
    box-shadow: 0 10px 20px rgba(74, 50, 24, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.compact-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.compact-card span {
    display: block;
    padding: 12px 14px 14px;
    color: var(--color-sand-900);
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin: 0;
    background: linear-gradient(135deg, var(--color-sand-100), #fff 55%, var(--color-dune-50));
    border-bottom: 1px solid var(--color-sand-200);
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -160px;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    background: rgba(217, 124, 30, 0.16);
}

.small-hero > div {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 74px 24px;
}

.page-hero h1 {
    font-size: clamp(2.1rem, 4vw, 4rem);
}

.page-hero p:not(.eyebrow) {
    max-width: 720px;
    margin: 16px 0 0;
    font-size: 1.05rem;
}

.list-toolbar-section {
    padding-top: 36px;
}

.list-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.list-toolbar input {
    max-width: 520px;
}

.empty-result {
    display: none;
    margin: 28px 0 0;
    padding: 22px;
    text-align: center;
    border-radius: 18px;
    background: #fff;
    color: var(--color-sand-700);
    border: 1px solid var(--color-sand-200);
}

.empty-result.show {
    display: block;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border-radius: 12px;
    border: 1px solid var(--color-sand-200);
    background: #fff;
    color: var(--color-sand-800);
    font-weight: 800;
}

.pagination a.active,
.pagination a:hover {
    color: #fff;
    background: var(--color-dune-500);
    border-color: var(--color-dune-500);
}

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

.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px 32px;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    background: var(--color-sand-100);
    box-shadow: var(--shadow-card);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--color-sand-600);
    font-weight: 700;
}

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

.detail-info h1 {
    font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.detail-line {
    max-width: 820px;
    margin: 18px 0 0;
    font-size: 1.12rem;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0;
}

.detail-meta div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--color-sand-200);
}

.detail-meta dt {
    color: var(--color-sand-600);
    font-size: 0.82rem;
    font-weight: 800;
}

.detail-meta dd {
    margin: 6px 0 0;
    color: var(--color-sand-900);
    font-weight: 900;
}

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

.player-section {
    padding-top: 30px;
    padding-bottom: 30px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #070504;
    box-shadow: 0 26px 60px rgba(20, 12, 4, 0.32);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.72));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-mark {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 999px;
    background: var(--color-dune-500);
    box-shadow: 0 16px 34px rgba(217, 124, 30, 0.35);
    font-size: 34px;
}

.detail-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    gap: 24px;
}

.story-card h2 {
    margin-bottom: 16px;
    font-size: 1.6rem;
}

.story-card p:last-child {
    margin-bottom: 0;
}

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

.site-footer {
    margin-top: 48px;
    background: var(--color-sand-900);
    color: rgba(255, 255, 255, 0.8);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

.footer-logo {
    color: #fff;
    margin-bottom: 12px;
}

.site-footer p {
    max-width: 520px;
    color: rgba(255, 255, 255, 0.68);
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-content: start;
    justify-content: flex-end;
}

.footer-links a:hover {
    color: #fff;
}

@media (max-width: 1120px) {
    .desktop-nav {
        gap: 14px;
        font-size: 0.94rem;
    }

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

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

@media (max-width: 900px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

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

    .hero-slider,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        margin-left: 0;
        padding: 98px 24px 96px;
    }

    .hero-arrow {
        display: none;
    }

    .split-section,
    .detail-hero,
    .detail-columns,
    .large-rank-list {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 360px;
    }
}

@media (max-width: 720px) {
    .header-inner {
        height: 64px;
        padding: 0 18px;
    }

    .section-container,
    .small-hero > div,
    .detail-hero {
        padding-left: 18px;
        padding-right: 18px;
    }

    .movie-grid,
    .category-grid,
    .compact-strip,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .rank-item {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .list-toolbar,
    .row-heading,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

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

    .hero-content h1 {
        font-size: 2.45rem;
    }

    .hero-summary {
        font-size: 1rem;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }

    .player-shell {
        border-radius: 18px;
    }
}
