:root {
    --sand-50: #faf8f3;
    --sand-100: #f5f0e6;
    --sand-200: #ebe2cd;
    --sand-300: #ddc9a3;
    --sand-500: #c49a5c;
    --sand-600: #b07d44;
    --sand-700: #8f6235;
    --sand-800: #6d4a29;
    --sand-900: #4a3218;
    --dune-50: #fdf6ed;
    --dune-100: #fae9d1;
    --dune-300: #ebb76a;
    --dune-500: #d97c1e;
    --dune-600: #c05f14;
    --dune-700: #9c4613;
    --white: #ffffff;
    --shadow: 0 16px 40px rgba(74, 50, 24, 0.12);
    --shadow-strong: 0 24px 70px rgba(74, 50, 24, 0.22);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--sand-50);
    color: var(--sand-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
}

img {
    width: 100%;
    height: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 28px rgba(74, 50, 24, 0.1);
}

.nav-shell {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    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: 800;
    color: var(--sand-900);
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
    box-shadow: 0 12px 24px rgba(217, 124, 30, 0.28);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 600;
}

.site-nav a {
    color: var(--sand-700);
    transition: color 0.2s ease;
}

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

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 10px;
    padding: 9px 13px;
    background: var(--sand-100);
    color: var(--sand-800);
    font-weight: 700;
}

.hero {
    position: relative;
    height: clamp(520px, 72vh, 760px);
    overflow: hidden;
    background: var(--sand-900);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.38) 50%, rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 76px;
    width: min(1180px, calc(100% - 48px));
    transform: translateX(-50%);
    color: var(--white);
}

.hero-content h1 {
    max-width: 820px;
    margin: 12px 0 18px;
    color: var(--white);
    font-size: clamp(36px, 7vw, 72px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(16px, 2vw, 22px);
}

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

.hero-meta span,
.detail-meta span,
.movie-meta span {
    color: inherit;
}

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

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

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

.btn-primary:hover,
.btn-glass:hover,
.btn-light:hover,
.text-link:hover {
    transform: translateY(-2px);
}

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

.btn-light {
    color: var(--dune-700);
    background: var(--dune-100);
}

.text-link {
    color: var(--dune-700);
    background: var(--dune-50);
}

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

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

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

.section-heading.with-action {
    justify-content: space-between;
    align-items: end;
}

.section-heading h2,
.page-hero h1,
.detail-intro h1 {
    color: var(--sand-900);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.section-line {
    width: 6px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--dune-500), var(--dune-700));
}

.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--dune-600);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.lead-text,
.category-desc {
    max-width: 900px;
    color: var(--sand-700);
    font-size: 18px;
}

.h-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 300px;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scrollbar-width: thin;
}

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

.movie-card,
.compact-card,
.category-tile,
.category-overview-block {
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-poster img,
.category-image img,
.compact-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .movie-poster img,
.category-tile:hover .category-image img,
.compact-card:hover .compact-cover img {
    transform: scale(1.08);
}

.movie-views {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 8px;
    padding: 4px 8px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
    font-weight: 700;
}

.movie-info {
    padding: 18px;
}

.movie-info h3,
.compact-card h3,
.category-tile h3 {
    margin: 0 0 8px;
    color: var(--sand-900);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.3;
}

.movie-info h3 a:hover,
.compact-card h3 a:hover,
.category-tile h3 a:hover {
    color: var(--dune-600);
}

.movie-info p,
.compact-card p,
.category-tile p {
    display: -webkit-box;
    overflow: hidden;
    color: var(--sand-700);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    margin-top: 12px;
    color: var(--sand-600);
    font-size: 13px;
}

.movie-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after,
.hero-meta span:not(:last-child)::after {
    content: "•";
    margin-left: 10px;
    opacity: 0.55;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

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

.hero-tags span,
.detail-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.soft-panel {
    background: linear-gradient(180deg, var(--sand-50), var(--white));
}

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

.category-tile {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 18px;
}

.category-image {
    height: 160px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--sand-200);
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.mini-links a {
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--dune-700);
    background: var(--dune-50);
    font-size: 12px;
    font-weight: 700;
}

.ranking-band {
    background: linear-gradient(135deg, var(--sand-900), #2b1c0b);
    color: var(--white);
}

.ranking-band h2,
.ranking-band p {
    color: var(--white);
}

.ranking-layout {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 40px;
    align-items: start;
}

.ranking-list,
.compact-grid {
    display: grid;
    gap: 16px;
}

.full-list {
    gap: 18px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: auto 116px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
}

.compact-card.no-rank {
    grid-template-columns: 116px 1fr;
}

.compact-cover {
    width: 116px;
    height: 86px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--sand-200);
}

.rank-no {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
    font-weight: 900;
}

.page-hero {
    min-height: 330px;
    padding: 72px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at 20% 20%, var(--dune-100), transparent 32%), linear-gradient(135deg, var(--sand-100), var(--sand-50));
}

.page-hero > div {
    max-width: 900px;
}

.page-hero h1 {
    margin-bottom: 18px;
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
    color: var(--sand-700);
    font-size: 18px;
}

.category-overview {
    display: grid;
    gap: 32px;
}

.category-overview-block {
    padding: 26px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 30px;
    padding: 18px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.search-panel {
    grid-template-columns: 2fr repeat(4, 1fr);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--sand-700);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--sand-200);
    border-radius: 12px;
    padding: 0 14px;
    color: var(--sand-900);
    background: var(--sand-50);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--dune-500);
    box-shadow: 0 0 0 4px rgba(217, 124, 30, 0.12);
}

.detail-hero {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 42px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px 28px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    background: var(--sand-200);
    box-shadow: var(--shadow-strong);
}

.detail-cover img {
    width: 100%;
    height: 540px;
    object-fit: cover;
}

.detail-intro {
    align-self: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--sand-600);
    font-size: 14px;
    font-weight: 700;
}

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

.detail-intro h1 {
    margin-bottom: 18px;
    font-size: clamp(36px, 6vw, 64px);
}

.detail-line {
    max-width: 780px;
    color: var(--sand-700);
    font-size: 19px;
}

.detail-meta {
    margin-top: 20px;
    color: var(--sand-600);
    font-weight: 700;
}

.player-wrap {
    padding-top: 28px;
}

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow-strong);
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.56));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-icon {
    width: 78px;
    height: 78px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    color: var(--white);
    background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
    box-shadow: 0 20px 44px rgba(217, 124, 30, 0.34);
    font-size: 30px;
}

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

.detail-body {
    max-width: 960px;
}

.detail-body h2 {
    margin: 28px 0 14px;
    color: var(--sand-900);
    font-size: 28px;
    font-weight: 900;
}

.detail-body p {
    color: var(--sand-700);
    font-size: 17px;
    line-height: 1.9;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.info-list div {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    border-radius: 14px;
    padding: 14px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.info-list dt {
    color: var(--sand-600);
    font-weight: 800;
}

.info-list dd {
    margin: 0;
    color: var(--sand-900);
}

.site-footer {
    margin-top: 56px;
    background: linear-gradient(180deg, var(--sand-100), var(--sand-200));
}

.footer-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
    gap: 28px;
}

.footer-grid h2 {
    margin-bottom: 14px;
    color: var(--sand-900);
    font-size: 18px;
    font-weight: 900;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: var(--sand-700);
    font-size: 14px;
    line-height: 1.8;
}

.footer-grid li + li {
    margin-top: 8px;
}

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

.footer-bottom {
    margin-top: 32px;
    border-top: 1px solid var(--sand-300);
    padding-top: 22px;
    text-align: center;
}

[hidden] {
    display: none !important;
}

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

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

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

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

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

@media (max-width: 780px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        border-radius: 18px;
        padding: 12px;
        background: var(--white);
        box-shadow: var(--shadow-strong);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        border-radius: 12px;
        padding: 12px 14px;
        background: var(--sand-50);
    }

    .hero-control {
        display: none;
    }

    .hero-content {
        bottom: 58px;
    }

    .movie-grid,
    .category-grid,
    .compact-grid,
    .footer-grid,
    .filter-panel,
    .search-panel,
    .info-list {
        grid-template-columns: 1fr;
    }

    .category-tile,
    .compact-card,
    .compact-card.no-rank {
        grid-template-columns: 96px 1fr;
    }

    .compact-card .rank-no {
        display: none;
    }

    .category-image,
    .compact-cover {
        width: 96px;
        height: 124px;
    }

    .movie-poster {
        height: 300px;
    }

    .detail-cover img {
        height: 500px;
    }
}

@media (max-width: 520px) {
    .nav-shell,
    .section-container,
    .footer-shell,
    .detail-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand {
        font-size: 18px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        width: calc(100% - 32px);
    }

    .hero-actions {
        align-items: stretch;
    }

    .hero-actions a {
        flex: 1 1 auto;
    }

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

    .movie-poster {
        height: 260px;
    }
}
