:root {
    --sand-50: #fdfcfa;
    --sand-100: #faf7f0;
    --sand-200: #f5eedd;
    --canyon-50: #faf8f5;
    --canyon-100: #f5f0e8;
    --canyon-200: #e8dbc8;
    --canyon-300: #d9c3a3;
    --canyon-500: #b8895a;
    --canyon-600: #a6714a;
    --canyon-700: #8a5c3f;
    --canyon-800: #704c37;
    --canyon-900: #5c3f2f;
    --earth-600: #7a6752;
    --earth-700: #655545;
    --earth-800: #56483c;
    --forest-50: #f4f6f4;
    --forest-100: #e5eae5;
    --forest-600: #4a5e4d;
    --forest-700: #3d4d40;
    --gold-300: #ffdf8f;
    --gold-400: #ffc94a;
    --gold-500: #ffb41e;
    --gold-600: #f09200;
    --shadow-canyon: 0 4px 6px -1px rgba(138, 92, 63, 0.10), 0 2px 4px -1px rgba(138, 92, 63, 0.06);
    --shadow-canyon-lg: 0 18px 30px -12px rgba(138, 92, 63, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--canyon-900);
    background: linear-gradient(135deg, var(--canyon-50), #ffffff 45%, var(--sand-50));
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--canyon-900), var(--earth-700), var(--canyon-700));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    box-shadow: 0 6px 18px rgba(255, 180, 30, 0.28);
}

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

.nav-link {
    font-weight: 650;
    color: rgba(255, 255, 255, 0.86);
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--gold-300);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search input,
.mobile-search input,
.filter-search input {
    width: 220px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    outline: none;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    padding: 10px 44px 10px 16px;
    transition: 0.2s ease;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.66);
}

.header-search input:focus,
.mobile-search input:focus {
    border-color: var(--gold-400);
    background: rgba(255, 255, 255, 0.20);
}

.header-search button {
    position: absolute;
    right: 8px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: transparent;
    cursor: pointer;
    font-size: 22px;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 10px;
    padding: 8px 11px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 16px 20px 20px;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-nav,
.mobile-cats {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.mobile-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    color: rgba(255, 255, 255, 0.78);
}

.mobile-search {
    display: flex;
    gap: 10px;
}

.mobile-search input {
    width: 100%;
}

.mobile-search button,
.btn-primary,
.btn-soft,
.filter-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 700;
    color: #ffffff;
    background: var(--gold-500);
    cursor: pointer;
    transition: 0.2s ease;
}

.mobile-search button:hover,
.btn-primary:hover,
.filter-search button:hover {
    background: var(--gold-600);
}

.btn-soft {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-soft:hover {
    background: rgba(255, 255, 255, 0.28);
}

main {
    min-height: 64vh;
}

.hero-carousel {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: #000000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s 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-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.50) 42%, rgba(0, 0, 0, 0.10));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 78px;
    width: min(1180px, calc(100% - 40px));
    transform: translateX(-50%);
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 180, 30, 0.92);
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-content h1 {
    max-width: 900px;
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.90);
    font-size: clamp(16px, 2vw, 21px);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.50);
    cursor: pointer;
    transform: translateY(-50%);
    transition: 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

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

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

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

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

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

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

.content-wrap {
    padding: 54px 0 72px;
}

.section-block {
    margin-bottom: 64px;
}

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

.section-title h2,
.page-hero h1,
.detail-copy h2 {
    margin: 0;
    color: var(--canyon-900);
    font-size: clamp(26px, 3.5vw, 38px);
    line-height: 1.2;
}

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

.scroller {
    overflow-x: auto;
    padding: 4px 0 18px;
}

.scroller-track {
    display: flex;
    gap: 22px;
    width: max-content;
}

.scroller-track .movie-card {
    width: 290px;
    flex: 0 0 290px;
}

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

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

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

.movie-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--canyon-200), var(--sand-200));
}

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

.movie-card:hover .poster-wrap img,
.mini-card:hover img {
    transform: scale(1.06);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.14));
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
    opacity: 1;
}

.year-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 4px 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.58);
    font-size: 12px;
    font-weight: 800;
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--gold-500);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: 0.25s ease;
    box-shadow: 0 10px 28px rgba(255, 180, 30, 0.35);
}

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

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 8px;
    min-height: 2.8em;
    color: var(--canyon-900);
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--gold-600);
}

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

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--earth-600);
    font-size: 13px;
}

.card-meta span:first-child {
    border-radius: 999px;
    padding: 4px 10px;
    color: var(--forest-700);
    background: var(--forest-100);
    font-weight: 750;
}

.category-panel {
    border-radius: 28px;
    padding: 34px;
    margin-bottom: 64px;
    background: linear-gradient(135deg, var(--forest-50), var(--canyon-50));
}

.category-row {
    margin-top: 26px;
}

.category-row h3 {
    margin: 0 0 14px;
    color: var(--forest-700);
    font-size: 22px;
}

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

.mini-card {
    display: grid;
    gap: 8px;
    border-radius: 16px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-canyon);
    overflow: hidden;
}

.mini-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.35s ease;
}

.mini-card span {
    color: var(--canyon-900);
    font-weight: 800;
    line-height: 1.35;
}

.mini-card em {
    color: var(--earth-600);
    font-style: normal;
    font-size: 12px;
}

.page-hero {
    padding: 58px 0 34px;
}

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

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

.category-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 22px;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--canyon-800), var(--earth-700));
    box-shadow: var(--shadow-canyon-lg);
    overflow: hidden;
    position: relative;
}

.category-card::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: -46px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 201, 74, 0.20);
}

.category-card h2 {
    position: relative;
    margin: 0 0 10px;
    font-size: 23px;
}

.category-card p {
    position: relative;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.category-card span {
    position: relative;
    margin-top: 18px;
    color: var(--gold-300);
    font-weight: 800;
}

.filter-search {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
}

.filter-search input {
    width: min(520px, 100%);
    color: var(--canyon-900);
    border-color: var(--canyon-300);
    background: #ffffff;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 60px 180px 1fr auto;
    align-items: center;
    gap: 18px;
    border-radius: 18px;
    padding: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-canyon);
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    font-weight: 900;
}

.rank-item img {
    width: 180px;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    object-fit: cover;
}

.rank-copy h2,
.rank-copy h3 {
    margin: 0 0 8px;
    color: var(--canyon-900);
    font-size: 20px;
}

.rank-copy p {
    margin: 0;
    color: var(--earth-700);
}

.detail-hero {
    color: #ffffff;
    background: linear-gradient(135deg, var(--canyon-900), var(--earth-800));
}

.detail-hero-inner {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 54px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 34px;
    align-items: center;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: var(--gold-300);
}

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

.detail-title p {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-tags span {
    border-radius: 999px;
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.detail-cover {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

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

.detail-main {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 52px 0 72px;
}

.watch-section {
    margin-bottom: 42px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: var(--shadow-canyon-lg);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 34px;
    background: var(--gold-500);
    box-shadow: 0 14px 34px rgba(255, 180, 30, 0.38);
}

.play-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.detail-copy {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 34px;
    align-items: start;
}

.copy-panel,
.side-panel {
    border-radius: 22px;
    padding: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-canyon);
}

.copy-panel h2,
.side-panel h2 {
    margin: 0 0 16px;
    color: var(--canyon-900);
}

.copy-panel p {
    margin: 0 0 24px;
    color: var(--earth-700);
    font-size: 17px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--canyon-100);
    padding-bottom: 10px;
}

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

.info-list dd {
    margin: 0;
    color: var(--canyon-900);
    text-align: right;
}

.related-section {
    margin-top: 54px;
}

.site-footer {
    color: #ffffff;
    background: linear-gradient(90deg, var(--canyon-900), var(--earth-700));
}

.footer-inner {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 36px;
}

.footer-logo {
    margin-bottom: 12px;
    color: var(--gold-300);
    font-size: 22px;
    font-weight: 900;
}

.footer-inner p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}

.footer-inner h2 {
    margin: 0 0 12px;
    color: var(--gold-300);
    font-size: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    color: rgba(255, 255, 255, 0.76);
}

.footer-links a:hover {
    color: var(--gold-300);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.62);
}

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

.empty-result {
    display: none;
    border-radius: 18px;
    padding: 26px;
    color: var(--earth-700);
    background: #ffffff;
    box-shadow: var(--shadow-canyon);
}

.empty-result.is-visible {
    display: block;
}

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

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

    .detail-hero-inner,
    .detail-copy {
        grid-template-columns: 1fr;
    }
}

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

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

    .hero-carousel {
        height: 520px;
    }

    .hero-content {
        bottom: 70px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .rank-item {
        grid-template-columns: 46px 110px 1fr;
    }

    .rank-item img {
        width: 110px;
    }

    .rank-item .btn-primary {
        grid-column: 2 / -1;
        text-align: center;
    }

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

@media (max-width: 560px) {
    .header-inner,
    .container,
    .detail-main,
    .detail-hero-inner,
    .footer-inner {
        width: min(100% - 28px, 1280px);
    }

    .hero-carousel {
        height: 500px;
    }

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

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions a {
        text-align: center;
    }

    .movie-grid,
    .mini-grid,
    .category-cards {
        grid-template-columns: 1fr;
    }

    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-panel {
        padding: 22px;
    }

    .filter-search {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-search input {
        width: 100%;
    }
}
