:root {
    --sand-50: #fffaf2;
    --sand-100: #fff4e5;
    --sand-200: #f2e6d9;
    --sand-300: #e8d4bf;
    --earth-50: #f8f4ef;
    --earth-100: #ede4da;
    --earth-300: #c2b4a3;
    --earth-500: #806b58;
    --earth-600: #6a594b;
    --earth-700: #514237;
    --earth-800: #392f28;
    --earth-900: #241d19;
    --desert-50: #fff3e8;
    --desert-100: #ffe2c4;
    --desert-400: #f2a35f;
    --desert-500: #ec8b3b;
    --desert-600: #d97324;
    --desert-700: #b65d1d;
    --white: #ffffff;
    --black: #000000;
    --shadow-soft: 0 18px 45px rgba(57, 47, 40, 0.12);
    --shadow-hover: 0 24px 60px rgba(57, 47, 40, 0.2);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--earth-900);
    background: var(--sand-50);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(57, 47, 40, 0.08);
    backdrop-filter: blur(16px);
}

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

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--desert-500), var(--earth-700));
    box-shadow: 0 8px 18px rgba(217, 115, 36, 0.24);
}

.brand-text {
    font-size: 24px;
    color: var(--earth-900);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-main,
.nav-cats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-links a {
    color: var(--earth-700);
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--desert-700);
    background: var(--desert-50);
}

.nav-cats a {
    font-size: 14px;
    color: var(--earth-600);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--sand-100);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    background: var(--earth-800);
    border-radius: 999px;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    color: var(--white);
    background: var(--earth-900);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 35%, rgba(236, 139, 59, 0.4), transparent 28%),
        linear-gradient(90deg, rgba(36, 29, 25, 0.9), rgba(36, 29, 25, 0.58) 45%, rgba(36, 29, 25, 0.22)),
        linear-gradient(0deg, rgba(36, 29, 25, 0.88), rgba(36, 29, 25, 0.05) 60%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 0 0 84px;
}

.hero-panel {
    width: min(760px, 100%);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: var(--desert-50);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 8vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 740px;
    margin: 0 0 28px;
    font-size: clamp(17px, 2vw, 22px);
    color: rgba(255, 255, 255, 0.88);
}

.hero-actions,
.detail-actions,
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    font-weight: 800;
    background: var(--desert-600);
    box-shadow: 0 12px 24px rgba(217, 115, 36, 0.24);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: var(--desert-700);
    box-shadow: 0 18px 34px rgba(217, 115, 36, 0.3);
}

.btn-secondary {
    color: var(--earth-900);
    background: var(--white);
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: none;
}

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

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

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

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

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

.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.home-search {
    margin-top: -36px;
    position: relative;
    z-index: 3;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

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

.search-box input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--desert-500);
    box-shadow: 0 0 0 4px rgba(236, 139, 59, 0.14);
}

main {
    min-height: 60vh;
}

.page-block {
    padding: 48px 0 76px;
}

.page-hero {
    padding: 72px 0 46px;
    background:
        radial-gradient(circle at 20% 10%, rgba(236, 139, 59, 0.18), transparent 34%),
        linear-gradient(135deg, var(--sand-100), var(--earth-50));
}

.page-hero h1 {
    max-width: 880px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.page-hero p {
    max-width: 860px;
    margin: 0;
    color: var(--earth-600);
    font-size: 18px;
}

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

.breadcrumb a {
    color: var(--desert-700);
    font-weight: 800;
}

.content-section {
    margin-top: 66px;
}

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

.section-heading p {
    margin: 0 0 6px;
    color: var(--desert-700);
    font-weight: 800;
}

.section-heading h2 {
    margin: 0;
    color: var(--earth-900);
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.12;
}

.section-more {
    color: var(--desert-700);
    font-weight: 800;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(236, 139, 59, 0.18), rgba(81, 66, 55, 0.2)),
        var(--earth-100);
}

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

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

.movie-year,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
    background: rgba(36, 29, 25, 0.72);
    backdrop-filter: blur(8px);
}

.rank-badge {
    background: var(--desert-600);
}

.movie-body {
    padding: 18px;
}

.movie-body h2,
.movie-body h3 {
    margin: 0 0 8px;
    color: var(--earth-900);
    font-size: 20px;
    line-height: 1.25;
}

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

.movie-body p {
    margin: 0 0 14px;
    color: var(--earth-600);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--earth-500);
    font-size: 14px;
}

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

.tag-row span,
.meta-pill,
.card-channel {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--earth-700);
    background: var(--sand-100);
    font-size: 13px;
    font-weight: 700;
}

.card-channel {
    margin-top: 12px;
    color: var(--desert-700);
    background: var(--desert-50);
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 160px;
}

.movie-card-horizontal .movie-thumb {
    height: 100%;
    aspect-ratio: auto;
}

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

.channel-card,
.stat-card {
    min-height: 170px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, var(--white), var(--sand-100));
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.channel-card:hover,
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.channel-card h2,
.channel-card h3,
.stat-card h2,
.stat-card h3 {
    margin: 0 0 10px;
    font-size: 23px;
    color: var(--earth-900);
}

.channel-card p,
.stat-card p {
    margin: 0 0 18px;
    color: var(--earth-600);
}

.channel-card span,
.stat-card span {
    color: var(--desert-700);
    font-weight: 800;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 180px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.rank-number {
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--desert-500), var(--earth-700));
}

.rank-row img {
    width: 180px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
    background: var(--earth-100);
}

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

.rank-row p {
    margin: 0 0 12px;
    color: var(--earth-600);
}

.rank-score {
    min-width: 120px;
    text-align: right;
    color: var(--desert-700);
    font-weight: 900;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--earth-900);
}

.player-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--black);
}

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(0deg, rgba(36, 29, 25, 0.62), rgba(36, 29, 25, 0.22));
    cursor: pointer;
}

.play-cover.is-hidden {
    display: none;
}

.play-button-core {
    display: inline-flex;
    width: 92px;
    height: 92px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    font-size: 34px;
    background: var(--desert-600);
    box-shadow: 0 16px 42px rgba(217, 115, 36, 0.38);
}

.detail-card {
    padding: 28px;
}

.detail-title {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.detail-intro {
    color: var(--earth-600);
    font-size: 18px;
}

.meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-text h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-text p {
    margin: 0 0 18px;
    color: var(--earth-700);
}

.side-card {
    padding: 20px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 96px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    background: var(--earth-100);
}

.related-item h3 {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.25;
}

.related-item p {
    margin: 0;
    color: var(--earth-500);
    font-size: 13px;
}

.site-footer {
    padding: 46px 0;
    color: var(--earth-100);
    background: var(--earth-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
}

.site-footer p {
    color: var(--earth-300);
}

.site-footer h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

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

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

.site-footer a {
    color: var(--earth-300);
}

.site-footer a:hover {
    color: var(--desert-400);
}

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

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

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

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

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

    .header-inner {
        min-height: 66px;
    }

    .brand-text {
        font-size: 20px;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        left: 12px;
        right: 12px;
        top: calc(100% + 8px);
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 18px;
        background: var(--white);
        box-shadow: var(--shadow-soft);
    }

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

    .nav-main {
        display: grid;
        gap: 4px;
    }

    .hero {
        min-height: 78vh;
    }

    .hero-content {
        padding-bottom: 74px;
    }

    .hero-control {
        display: none;
    }

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

    .movie-grid,
    .movie-grid.compact,
    .channel-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 48px 96px 1fr;
    }

    .rank-row img {
        width: 96px;
    }

    .rank-score {
        grid-column: 3;
        text-align: left;
    }

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