:root {
    --earth-950: #1c140f;
    --earth-900: #2a1d15;
    --earth-800: #3f2d22;
    --earth-700: #574130;
    --earth-600: #755b44;
    --earth-500: #92765c;
    --sand-50: #fffaf0;
    --sand-100: #f8ecd5;
    --sand-200: #efd7ad;
    --sand-500: #c99450;
    --sand-600: #ad7838;
    --desert-50: #fff3e7;
    --desert-100: #ffe1c2;
    --desert-500: #e47c2b;
    --desert-600: #ca5f18;
    --desert-700: #a94712;
    --white: #ffffff;
    --shadow-card: 0 12px 32px rgba(63, 45, 34, 0.12);
    --shadow-soft: 0 18px 48px rgba(42, 29, 21, 0.18);
    --radius-xl: 22px;
    --radius-lg: 16px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--earth-900);
    background: linear-gradient(180deg, var(--sand-50), #ffffff 38%, #fff7ea);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 250, 240, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 28px rgba(63, 45, 34, 0.08);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--desert-500), var(--sand-600));
    box-shadow: 0 10px 24px rgba(202, 95, 24, 0.28);
}

.brand-text {
    font-size: 20px;
    letter-spacing: 0.02em;
}

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

.nav-link,
.nav-dropdown > button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--earth-700);
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-dropdown > button:hover {
    color: var(--desert-700);
    background: var(--desert-50);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 180px;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--earth-700);
}

.dropdown-panel a:hover {
    background: var(--sand-50);
    color: var(--desert-700);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: var(--desert-600);
    color: #ffffff;
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.hero {
    position: relative;
    height: min(640px, 78vh);
    min-height: 520px;
    overflow: hidden;
    background: var(--earth-900);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 45%, rgba(228, 124, 43, 0.34), transparent 24%),
        linear-gradient(90deg, rgba(18, 12, 8, 0.88), rgba(35, 24, 18, 0.6) 46%, rgba(0, 0, 0, 0.1));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #ffffff;
    max-width: 760px;
}

.hero-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 8px 16px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(202, 95, 24, 0.92);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 18px 0 14px;
    max-width: 760px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 22px;
    font-size: clamp(17px, 2.2vw, 23px);
    color: var(--sand-100);
    line-height: 1.75;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 22px;
}

.tag-row span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--earth-800);
    background: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 700;
}

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

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

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

.button.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--desert-600), var(--desert-500));
    box-shadow: 0 16px 34px rgba(202, 95, 24, 0.34);
}

.button.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(12px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.32);
    cursor: pointer;
    font-size: 36px;
    line-height: 0;
    backdrop-filter: blur(10px);
}

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

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

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

.hero-dots button {
    width: 18px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 42px;
    background: #ffffff;
}

.search-panel {
    margin-top: -48px;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.8fr auto;
    gap: 16px;
    align-items: end;
    padding: 22px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.search-box label,
.filter-box label {
    display: block;
    margin-bottom: 8px;
    color: var(--earth-700);
    font-size: 13px;
    font-weight: 800;
}

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

.search-box input:focus,
.filter-box select:focus {
    border-color: var(--desert-500);
    box-shadow: 0 0 0 4px rgba(228, 124, 43, 0.14);
}

.search-status {
    margin: 0;
    color: var(--earth-600);
    font-weight: 700;
}

.search-results {
    grid-column: 1 / -1;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.search-results.active {
    display: grid;
}

.search-result-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: var(--sand-50);
}

.search-result-card img {
    width: 64px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
}

.search-result-card strong {
    display: block;
    margin-bottom: 4px;
}

.search-result-card span {
    color: var(--earth-600);
    font-size: 13px;
}

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

.section-heading,
.strip-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.section-heading h2,
.page-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
    margin: 0;
    color: var(--earth-600);
    line-height: 1.8;
}

.text-link,
.strip-heading a {
    color: var(--desert-700);
    font-weight: 800;
}

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

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sand-100), var(--desert-50));
}

.movie-card.large .poster-link {
    height: 330px;
}

.movie-card.small .poster-link {
    height: 180px;
}

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

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

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: var(--desert-600);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.78);
    transition: 0.24s ease;
}

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

.card-type {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(202, 95, 24, 0.9);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--desert-700);
}

.movie-meta,
.movie-card-body p {
    margin: 0;
    color: var(--earth-600);
    font-size: 13px;
    line-height: 1.65;
}

.movie-card-body p + p,
.movie-card-body .movie-meta + p {
    margin-top: 8px;
}

.two-column-section {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 36px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 38px 72px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.rank-number,
.rank-large-number {
    color: var(--desert-700);
    font-weight: 900;
    font-size: 22px;
}

.rank-item img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-title {
    font-weight: 800;
}

.rank-meta {
    color: var(--earth-600);
    font-size: 13px;
}

.category-strip-list {
    display: grid;
    gap: 34px;
}

.category-strip {
    padding: 24px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 243, 231, 0.9));
    box-shadow: var(--shadow-card);
}

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

.category-card a {
    display: grid;
    grid-template-columns: 190px 1fr;
    min-height: 180px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
}

.category-covers img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
}

.category-info {
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-info h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.category-info p {
    margin: 0 0 18px;
    color: var(--earth-600);
}

.category-info span {
    color: var(--desert-700);
    font-weight: 800;
}

.category-full-grid {
    grid-template-columns: repeat(4, 1fr);
}

.page-hero {
    padding: 70px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 10% 20%, rgba(228, 124, 43, 0.48), transparent 28%),
        linear-gradient(135deg, var(--earth-900), var(--earth-700));
}

.page-hero p {
    color: var(--sand-100);
}

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

.breadcrumb.light,
.page-hero .breadcrumb {
    color: var(--sand-100);
}

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

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: var(--earth-900);
}

.detail-bg,
.detail-bg img,
.detail-overlay {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(14px) saturate(1.12);
    transform: scale(1.08);
    opacity: 0.5;
}

.detail-overlay {
    background:
        radial-gradient(circle at 26% 45%, rgba(228, 124, 43, 0.32), transparent 30%),
        linear-gradient(90deg, rgba(20, 12, 8, 0.95), rgba(42, 29, 21, 0.74));
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    padding: 72px 0;
}

.detail-main {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
}

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

.detail-copy h1 {
    margin: 18px 0 14px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.1;
}

.detail-one-line {
    max-width: 760px;
    color: var(--sand-100);
    font-size: 20px;
    line-height: 1.8;
}

.detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-facts span {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--sand-50);
    background: rgba(255, 255, 255, 0.12);
}

.player-section {
    margin-top: -70px;
    position: relative;
    z-index: 5;
}

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

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.66));
    cursor: pointer;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    color: var(--desert-600);
    background: rgba(255, 255, 255, 0.94);
    font-size: 30px;
}

.player-start strong {
    font-size: 20px;
}

.player-shell.playing .player-start {
    display: none;
}

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

.text-panel {
    padding: 28px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.text-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.text-panel p {
    margin: 0;
    color: var(--earth-700);
    line-height: 1.95;
}

.meta-panel {
    grid-column: 1 / -1;
}

.meta-panel dl {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 0;
}

.meta-panel div {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    background: var(--sand-50);
}

.meta-panel dt {
    color: var(--earth-600);
    font-weight: 800;
}

.meta-panel dd {
    margin: 0;
}

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

.rank-full-item a {
    display: grid;
    grid-template-columns: 70px 120px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-full-item a:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.rank-full-item img {
    width: 120px;
    height: 88px;
    object-fit: cover;
    border-radius: 16px;
}

.rank-full-item h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-full-item p {
    margin: 0 0 6px;
    color: var(--earth-600);
    line-height: 1.65;
}

.rank-full-item span:last-child {
    color: var(--desert-700);
    font-weight: 800;
}

.site-footer {
    margin-top: 90px;
    padding-top: 48px;
    background: linear-gradient(180deg, var(--earth-50, #fff8ed), #f4e1c8);
    border-top: 1px solid rgba(117, 91, 68, 0.16);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 38px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-grid p,
.footer-grid a {
    color: var(--earth-600);
    line-height: 1.8;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.footer-grid a:hover {
    color: var(--desert-700);
}

.footer-bottom {
    margin-top: 34px;
    padding: 20px;
    text-align: center;
    color: var(--earth-600);
    border-top: 1px solid rgba(117, 91, 68, 0.14);
}

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

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

    .two-column-section,
    .detail-content,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .detail-main {
        grid-template-columns: 240px 1fr;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 64px;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 20px;
        background: #ffffff;
        box-shadow: var(--shadow-soft);
    }

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

    .nav-dropdown {
        display: none;
    }

    .hero {
        height: 680px;
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 96px;
    }

    .hero-control {
        display: none;
    }

    .search-panel {
        grid-template-columns: 1fr;
        margin-top: 18px;
    }

    .search-results,
    .search-results.active {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .category-full-grid,
    .compact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .poster-link,
    .movie-card.small .poster-link {
        height: 210px;
    }

    .rank-item {
        grid-template-columns: 34px 60px 1fr;
    }

    .rank-meta {
        display: none;
    }

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

    .category-covers img {
        min-height: 120px;
    }

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

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

    .player-section {
        margin-top: 24px;
    }

    .meta-panel dl,
    .footer-grid,
    .rank-full-item a {
        grid-template-columns: 1fr;
    }

    .rank-full-item img {
        width: 100%;
        height: 180px;
    }
}

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

    .poster-link,
    .movie-card.small .poster-link {
        height: 280px;
    }
}
