:root {
    --sand-50: #faf8f3;
    --sand-100: #f5f0e6;
    --sand-200: #ebe2cd;
    --sand-300: #ddc9a3;
    --sand-400: #d4b683;
    --sand-500: #c49a5c;
    --sand-600: #b07d44;
    --sand-700: #8f6235;
    --sand-800: #6d4a29;
    --sand-900: #4a3218;
    --dune-50: #fdf6ed;
    --dune-100: #fae9d1;
    --dune-200: #f5d4a3;
    --dune-300: #ebb76a;
    --dune-400: #e19838;
    --dune-500: #d97c1e;
    --dune-600: #c05f14;
    --dune-700: #9c4613;
    --dune-800: #7d3714;
    --ink: #25170d;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(74, 50, 24, 0.14);
    --shadow-soft: 0 10px 30px rgba(74, 50, 24, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--sand-900);
    background:
        radial-gradient(circle at top left, rgba(217, 124, 30, 0.12), transparent 30rem),
        linear-gradient(180deg, var(--sand-50), #fff 35%, var(--sand-100));
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(221, 201, 163, 0.55);
    box-shadow: 0 8px 24px rgba(74, 50, 24, 0.08);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    color: var(--dune-700);
    white-space: nowrap;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
    box-shadow: 0 12px 28px rgba(217, 124, 30, 0.26);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
    font-weight: 700;
    color: var(--sand-700);
}

.nav-link {
    position: relative;
    padding: 23px 0;
    transition: color 0.22s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 15px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--dune-500), var(--sand-600));
    opacity: 0;
    transform: scaleX(0.5);
    transition: 0.22s ease;
}

.nav-link:hover {
    color: var(--dune-700);
}

.nav-link:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--sand-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--sand-800);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.65s ease;
    transform: scale(1.02);
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(1.05);
}

.hero-shade,
.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(37, 23, 13, 0.94), rgba(37, 23, 13, 0.58), rgba(37, 23, 13, 0.18)),
        linear-gradient(180deg, rgba(37, 23, 13, 0.22), rgba(37, 23, 13, 0.88));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) 360px;
    align-items: center;
    gap: 54px;
    padding: 72px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--dune-600);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 760px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

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

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

.hero-tags span,
.detail-chips span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 800;
}

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

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

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

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
    box-shadow: 0 16px 34px rgba(217, 124, 30, 0.28);
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 30px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

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

.hero-poster span,
.play-mark {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: rgba(217, 124, 30, 0.92);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.hero-poster span {
    left: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    font-size: 22px;
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--dune-300);
}

.search-panel,
.filter-bar,
.section,
.page-hero,
.watch-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
    gap: 26px;
    align-items: center;
    margin-top: -48px;
    position: relative;
    z-index: 5;
    padding: 28px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(221, 201, 163, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-panel h2,
.section-head h2,
.rank-panel h2,
.detail-text h2,
.site-footer h2 {
    margin: 0;
    color: var(--sand-900);
    font-size: 26px;
    line-height: 1.2;
    font-weight: 950;
}

.search-panel p {
    margin: 8px 0 0;
    color: var(--sand-700);
}

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

.search-form input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--sand-200);
    border-radius: 13px;
    outline: 0;
    color: var(--sand-900);
    background: var(--white);
}

.search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--dune-400);
    box-shadow: 0 0 0 4px rgba(217, 124, 30, 0.13);
}

.section {
    padding: 64px 0 0;
}

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

.section-head a,
.text-link {
    color: var(--dune-700);
    font-weight: 900;
}

.section-head.compact {
    align-items: center;
    margin-bottom: 18px;
}

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

.category-card,
.category-overview {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    min-height: 210px;
    background: var(--sand-900);
    box-shadow: var(--shadow-soft);
}

.category-card img,
.category-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.35s ease;
}

.category-card::after,
.category-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(37, 23, 13, 0.88));
}

.category-card span,
.category-card em {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
}

.category-card span {
    bottom: 64px;
    color: var(--white);
    font-size: 22px;
    font-weight: 950;
}

.category-card em {
    bottom: 20px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-style: normal;
}

.category-card:hover img,
.category-overview:hover img {
    transform: scale(1.07);
}

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

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

.card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(235, 226, 205, 0.8);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(217, 124, 30, 0.35);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    height: 285px;
    overflow: hidden;
    background: var(--sand-200);
}

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

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

.score {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(37, 23, 13, 0.74);
    font-weight: 900;
    font-size: 13px;
    backdrop-filter: blur(10px);
}

.play-mark {
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    opacity: 0;
    transform: scale(0.9);
    transition: 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: scale(1);
}

.card-body {
    padding: 16px;
}

.card-tags {
    min-height: 24px;
    margin-bottom: 10px;
}

.card-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--dune-700);
    background: var(--dune-100);
    font-size: 12px;
    font-weight: 800;
}

.card-body h2 {
    display: -webkit-box;
    min-height: 50px;
    margin: 0;
    overflow: hidden;
    color: var(--sand-900);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 950;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body p {
    display: -webkit-box;
    height: 47px;
    margin: 10px 0 14px;
    overflow: hidden;
    color: var(--sand-700);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.meta-row span,
.detail-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--sand-100);
}

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

.rank-panel {
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(235, 226, 205, 0.8);
    box-shadow: var(--shadow-soft);
}

.sticky-panel {
    position: sticky;
    top: 92px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 78px;
    padding: 10px;
    border-radius: 16px;
    background: var(--sand-50);
    transition: background 0.22s ease, transform 0.22s ease;
}

.rank-item:hover {
    background: var(--dune-100);
    transform: translateX(3px);
}

.rank-no {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
    font-weight: 950;
    font-size: 13px;
}

.rank-item img {
    width: 58px;
    height: 58px;
    border-radius: 13px;
    object-fit: cover;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info strong {
    color: var(--sand-900);
    font-size: 15px;
}

.rank-info em {
    color: var(--sand-600);
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    padding: 78px 0 32px;
}

.page-hero h1 {
    color: var(--sand-900);
}

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

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 20px;
    color: var(--sand-600);
    font-size: 14px;
    font-weight: 800;
}

.crumbs a {
    color: var(--dune-700);
}

.filter-bar {
    position: relative;
    z-index: 2;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(235, 226, 205, 0.88);
    box-shadow: var(--shadow-soft);
}

.filter-bar input {
    flex: 1.4;
}

.filter-bar select {
    flex: 0.7;
}

.category-layout {
    padding-top: 34px;
}

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

.category-overview {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 250px;
    background: var(--white);
}

.category-cover {
    position: relative;
    overflow: hidden;
    min-height: 250px;
    background: var(--sand-900);
}

.category-cover span {
    position: absolute;
    z-index: 2;
    left: 18px;
    bottom: 18px;
    color: var(--white);
    font-size: 24px;
    font-weight: 950;
}

.category-overview-body {
    padding: 24px;
}

.category-overview-body h2 {
    margin: 0;
    color: var(--sand-900);
    font-size: 24px;
    font-weight: 950;
}

.category-overview-body p {
    color: var(--sand-700);
}

.teaser-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.teaser-links span {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--sand-700);
    background: var(--sand-100);
    font-size: 12px;
    font-weight: 800;
}

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

.detail-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    padding: 64px 0;
}

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

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

.detail-info .crumbs {
    color: rgba(255, 255, 255, 0.74);
}

.detail-info .crumbs a {
    color: var(--dune-200);
}

.detail-info .lead {
    max-width: 820px;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.detail-meta span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
}

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

.watch-section {
    margin-top: -78px;
    position: relative;
    z-index: 4;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle, rgba(37, 23, 13, 0.22), rgba(37, 23, 13, 0.60));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    font-size: 34px;
}

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

.detail-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
}

.detail-text {
    padding: 28px;
}

.detail-text h2 + p {
    margin-top: 12px;
}

.detail-text p {
    color: var(--sand-800);
    font-size: 17px;
}

.detail-chips {
    margin-top: 22px;
}

.detail-chips span {
    color: var(--dune-800);
    background: var(--dune-100);
    border-color: rgba(217, 124, 30, 0.14);
}

.site-footer {
    margin-top: 76px;
    padding: 54px 0 24px;
    background: var(--sand-900);
    color: rgba(255, 255, 255, 0.76);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.8fr 0.8fr;
    gap: 36px;
}

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

.site-footer h2 {
    margin-bottom: 12px;
    color: var(--white);
    font-size: 17px;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li {
    margin: 8px 0;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.56);
    font-size: 13px;
    text-align: center;
}

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

@media (max-width: 1100px) {
    .main-nav {
        gap: 14px;
        font-size: 14px;
    }

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

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

    .two-column,
    .detail-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sticky-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        align-items: end;
        padding: 58px 0 82px;
    }

    .hero-poster {
        display: none;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

    .search-form,
    .filter-bar {
        flex-direction: column;
    }

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

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

    .detail-content {
        grid-template-columns: 1fr;
        gap: 26px;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .nav-wrap,
    .search-panel,
    .filter-bar,
    .section,
    .page-hero,
    .watch-section,
    .detail-content,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-copy p,
    .page-hero p,
    .detail-info .lead {
        font-size: 16px;
    }

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

    .poster-link {
        height: 360px;
    }

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

    .search-panel {
        margin-top: -32px;
        padding: 20px;
    }

    .play-overlay span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
