:root {
    --sand-50: #fdfaf7;
    --sand-100: #f9f3ed;
    --sand-200: #f2e6d9;
    --sand-300: #e8d4bd;
    --earth-100: #ede9e4;
    --earth-300: #c2b4a3;
    --earth-400: #a89380;
    --earth-500: #8f7862;
    --earth-600: #786351;
    --earth-700: #635144;
    --earth-900: #473c33;
    --desert-50: #fef9f3;
    --desert-100: #fdf2e5;
    --desert-400: #f2ad6b;
    --desert-500: #ec8b3b;
    --desert-600: #dd6f1f;
    --desert-700: #b75617;
    --white: #ffffff;
    --black: #000000;
    --shadow-soft: 0 12px 30px rgba(71, 60, 51, 0.12);
    --shadow-hover: 0 24px 60px rgba(71, 60, 51, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(242, 230, 217, 0.95);
    box-shadow: 0 8px 30px rgba(71, 60, 51, 0.08);
    backdrop-filter: blur(16px);
}

.top-nav {
    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: 24px;
    font-weight: 800;
    color: var(--earth-900);
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--desert-600), var(--desert-400));
    box-shadow: 0 10px 22px rgba(221, 111, 31, 0.28);
}

.brand-icon svg {
    fill: #fff;
}

.desktop-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    position: relative;
    color: var(--earth-700);
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    border-radius: 999px;
    background: var(--desert-600);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--desert-600);
}

.nav-link:hover::after,
.nav-link.active::after {
    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: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--earth-700);
    border-radius: 999px;
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 18px;
    border-top: 1px solid var(--sand-200);
}

.mobile-menu.is-open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 10px 4px;
    color: var(--earth-700);
    font-weight: 700;
}

.hero-carousel {
    position: relative;
    height: 76vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--earth-900);
}

.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-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 25%, rgba(242, 173, 107, 0.18), transparent 34%),
        linear-gradient(to top, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.16));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    padding: 0 0 86px;
    color: #fff;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 14px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(253, 242, 229, 0.14);
    color: var(--desert-400);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-content h1 {
    max-width: 850px;
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

.hero-tags,
.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--sand-100);
    color: var(--earth-700);
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    backdrop-filter: blur(12px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
    background: var(--desert-600);
    color: #fff;
    box-shadow: 0 16px 30px rgba(221, 111, 31, 0.34);
}

.btn-primary:hover {
    background: var(--desert-700);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(14px);
}

.btn-ghost {
    background: #fff;
    color: var(--earth-900);
}

.hero-nav {
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 26px;
}

.hero-next {
    right: 26px;
}

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

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

.hero-dots button.is-active {
    width: 34px;
    background: #fff;
}

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

.search-band {
    padding: 54px 0 18px;
}

.search-card {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 440px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    border: 1px solid var(--sand-200);
    border-radius: 28px;
    background: linear-gradient(135deg, #fff, var(--desert-50));
    box-shadow: var(--shadow-soft);
}

.search-card h2,
.section-head h2,
.rank-panel-head h2,
.footer-grid h2,
.detail-article h2 {
    margin: 0;
    color: var(--earth-900);
}

.search-card p,
.section-head p,
.category-overview-card p,
.footer-grid p,
.detail-title-block p,
.detail-article p {
    color: var(--earth-600);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: 1px solid var(--sand-300);
    border-radius: 18px;
    background: #fff;
}

.search-box span {
    color: var(--desert-600);
    font-size: 20px;
    font-weight: 900;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--earth-900);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 20px;
}

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

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

.section-head h2 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.08;
}

.section-head p {
    max-width: 720px;
    margin: 10px 0 0;
}

.section-more {
    flex: 0 0 auto;
    color: var(--desert-600);
    font-weight: 800;
}

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

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

.movie-grid-featured .movie-card-large {
    grid-column: span 2;
}

.movie-card {
    min-width: 0;
}

.movie-card-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(242, 230, 217, 0.9);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--earth-100);
}

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

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

.card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.66), transparent 58%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card-link:hover .card-gradient {
    opacity: 1;
}

.duration-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 9px;
    padding: 16px;
}

.movie-card-body strong {
    color: var(--earth-900);
    font-size: 18px;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.movie-card-large .movie-card-body strong {
    font-size: 24px;
}

.movie-card-link:hover strong {
    color: var(--desert-600);
}

.movie-line {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: var(--earth-600);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--earth-500);
    font-size: 13px;
}

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

.category-card,
.category-overview-card a {
    display: flex;
    min-height: 176px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid var(--sand-200);
    border-radius: 26px;
    background: linear-gradient(135deg, #fff, var(--sand-100));
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-overview-card a:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.category-card span,
.category-overview-card span {
    color: var(--earth-900);
    font-size: 21px;
    font-weight: 900;
}

.category-card strong,
.category-overview-card strong {
    color: var(--desert-600);
    font-size: 42px;
    line-height: 1;
}

.category-card em,
.category-overview-card p {
    margin: 0;
    color: var(--earth-600);
    font-style: normal;
    font-size: 14px;
}

.two-column-section,
.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
    align-items: start;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--sand-200);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(71, 60, 51, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.compact-card img {
    width: 150px;
    height: 92px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--earth-100);
}

.compact-card strong,
.compact-card em {
    display: block;
}

.compact-card strong {
    margin-bottom: 6px;
    color: var(--earth-900);
    font-size: 16px;
}

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

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
    border: 1px solid var(--sand-200);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.rank-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.rank-panel-head span {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--desert-600);
    color: #fff;
    font-weight: 900;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 76px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.rank-row:hover {
    background: var(--sand-50);
}

.rank-number {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--earth-100);
    color: var(--earth-700);
    font-weight: 900;
}

.rank-number.top {
    background: var(--desert-600);
    color: #fff;
}

.rank-row img {
    width: 76px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--earth-100);
}

.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(--earth-900);
    font-size: 14px;
}

.rank-info em,
.rank-views {
    color: var(--earth-500);
    font-size: 12px;
    font-style: normal;
}

.rank-list-page {
    padding: 18px;
    border: 1px solid var(--sand-200);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.page-hero,
.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0 28px;
}

.small-hero,
.category-hero {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 30px;
    align-items: end;
}

.page-hero h1,
.detail-title-block h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p,
.detail-title-block p {
    max-width: 760px;
    margin: 14px 0 0;
    font-size: 18px;
}

.page-search {
    align-self: end;
}

.detail-title-block {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: end;
    padding: 28px;
    border-radius: 30px;
    background: linear-gradient(135deg, #fff, var(--desert-50));
    box-shadow: var(--shadow-soft);
}

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

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

.watch-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 58px;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
    color: #fff;
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
    display: inline-flex;
    width: 74px;
    height: 74px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--desert-600);
    box-shadow: 0 16px 34px rgba(221, 111, 31, 0.34);
    font-size: 30px;
    text-indent: 5px;
}

.player-overlay strong {
    max-width: 80%;
    overflow: hidden;
    font-size: 28px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-overlay em {
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
}

.detail-article {
    margin-top: 30px;
    padding: 30px;
    border: 1px solid var(--sand-200);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.detail-article h2 {
    margin-top: 0;
    font-size: 26px;
}

.detail-article h2 + p {
    margin-top: 10px;
}

.detail-side {
    position: sticky;
    top: 92px;
    padding: 20px;
    border: 1px solid var(--sand-200);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.detail-side img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 20px;
    object-fit: cover;
    background: var(--earth-100);
}

.detail-side dl {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.detail-side dl div {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: baseline;
}

.detail-side dt {
    color: var(--earth-500);
    font-size: 13px;
}

.detail-side dd {
    margin: 0;
    color: var(--earth-900);
    font-weight: 800;
}

.detail-side dd a {
    color: var(--desert-600);
}

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

.prev-next a {
    padding: 18px 20px;
    border: 1px solid var(--sand-200);
    border-radius: 18px;
    background: #fff;
    color: var(--earth-700);
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.site-footer {
    margin-top: 40px;
    background: var(--earth-900);
    color: var(--earth-100);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 28px;
}

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

.footer-brand {
    margin-bottom: 14px;
    color: #fff;
    font-size: 22px;
}

.footer-grid h2 {
    margin-bottom: 14px;
    color: #fff;
    font-size: 18px;
}

.footer-grid p,
.footer-grid a {
    color: var(--earth-300);
    font-size: 14px;
}

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

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid rgba(194, 180, 163, 0.26);
    color: var(--earth-400);
    font-size: 13px;
}

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

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

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

    .two-column-section,
    .watch-layout,
    .small-hero,
    .category-hero {
        grid-template-columns: 1fr;
    }

    .rank-panel,
    .detail-side {
        position: static;
    }

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

@media (max-width: 760px) {
    .desktop-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .brand {
        font-size: 20px;
    }

    .hero-carousel {
        height: 72vh;
        min-height: 520px;
    }

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

    .hero-nav {
        display: none;
    }

    .search-card,
    .detail-title-block {
        grid-template-columns: 1fr;
        padding: 22px;
    }

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

    .movie-grid-featured .movie-card-large {
        grid-column: span 1;
    }

    .section-head {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 12px;
    }

    .compact-card {
        grid-template-columns: 112px 1fr;
    }

    .compact-card img {
        width: 112px;
        height: 76px;
    }

    .rank-row {
        grid-template-columns: 34px 62px minmax(0, 1fr);
    }

    .rank-views {
        display: none;
    }

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

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

    .footer-bottom {
        flex-direction: column;
    }
}
