:root {
    --sand-50: #faf8f3;
    --sand-100: #f5f0e5;
    --stone-50: #f7f6f4;
    --stone-100: #eeebe6;
    --stone-200: #ddd8cf;
    --stone-400: #ac9e8e;
    --stone-600: #8d7a69;
    --stone-700: #756458;
    --stone-800: #60544b;
    --stone-900: #4f453e;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --purple-600: #9333ea;
    --pink-500: #ec4899;
    --desert-500: #d4844b;
    --shadow-sand: 0 18px 45px -18px rgba(142, 93, 64, 0.38);
    --shadow-strong: 0 24px 55px -18px rgba(68, 45, 78, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--stone-800);
    background: linear-gradient(180deg, var(--stone-50), #ffffff 42%, var(--sand-50));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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;
    border-bottom: 1px solid rgba(221, 216, 207, 0.82);
    background: rgba(250, 248, 243, 0.92);
    backdrop-filter: blur(14px);
}

.nav-shell {
    width: min(1240px, calc(100% - 28px));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--stone-900);
    white-space: nowrap;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--rose-500), var(--purple-600));
    box-shadow: var(--shadow-sand);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--stone-700);
    font-weight: 600;
}

.main-nav a {
    position: relative;
    padding: 8px 0;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 2px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rose-500), var(--purple-600));
    transition: right 0.25s ease;
}

.main-nav a:hover::after {
    right: 0;
}

.top-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--stone-200);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
}

.top-search input {
    width: 220px;
    border: 0;
    outline: 0;
    padding: 7px 10px 7px 14px;
    background: transparent;
    color: var(--stone-800);
}

.top-search button,
.btn-primary,
.btn-ghost,
.section-more {
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

.top-search button,
.btn-primary {
    padding: 9px 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose-500), var(--purple-600));
    box-shadow: 0 10px 28px -16px rgba(225, 29, 72, 0.9);
}

.btn-ghost {
    padding: 9px 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--stone-100);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: var(--stone-800);
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--stone-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity 0.6s ease, transform 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 25%, rgba(244, 63, 94, 0.22), transparent 35%),
        linear-gradient(180deg, transparent 60%, rgba(20, 17, 20, 0.84));
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 34px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    align-items: center;
    gap: 44px;
    color: #fff;
    padding: 90px 0 72px;
}

.hero-copy {
    max-width: 720px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--rose-600);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-kicker {
    color: #fecdd3;
}

.hero-copy h1 {
    margin: 18px 0 18px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 660px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow-strong);
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.1;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(8px);
    font-weight: 800;
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 56px;
    background: #fff;
}

.quick-panel {
    width: min(1180px, calc(100% - 32px));
    margin: -34px auto 0;
    position: relative;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quick-panel a {
    padding: 18px 20px;
    border-radius: 20px;
    color: var(--stone-800);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sand);
    font-weight: 800;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.quick-panel a:hover,
.movie-card:hover,
.category-card:hover,
.rank-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.page-main {
    padding-top: 44px;
}

.page-section {
    margin: 70px auto;
}

.soft-panel {
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(135deg, #fff1f2, #faf5ff);
    box-shadow: var(--shadow-sand);
}

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

.section-heading h2,
.sub-hero h1,
.detail-copy h1 {
    margin: 6px 0 0;
    color: var(--stone-900);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.section-more {
    padding: 10px 16px;
    color: var(--rose-600);
    background: #fff;
    border: 1px solid #ffe4e6;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(221, 216, 207, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sand);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--stone-100);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.year-badge,
.play-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.year-badge {
    left: 12px;
    background: rgba(0, 0, 0, 0.52);
}

.play-badge {
    right: 12px;
    background: rgba(244, 63, 94, 0.88);
}

.card-content {
    padding: 16px;
}

.movie-meta {
    color: var(--stone-500, #998977);
    font-size: 12px;
    font-weight: 700;
}

.card-content h3 {
    margin: 7px 0 7px;
    color: var(--stone-900);
    font-size: 18px;
    line-height: 1.28;
}

.movie-card-compact .card-content h3 {
    font-size: 16px;
}

.card-content p {
    margin: 0 0 12px;
    color: var(--stone-700);
    font-size: 14px;
}

.tag-row span {
    color: var(--rose-600);
    background: #fff1f2;
}

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

.category-card {
    min-height: 188px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(221, 216, 207, 0.9);
    box-shadow: var(--shadow-sand);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card span {
    color: var(--rose-600);
    font-weight: 900;
}

.category-card h3 {
    min-height: 68px;
    margin: 9px 0 16px;
    color: var(--stone-900);
    font-size: 18px;
    line-height: 1.35;
}

.category-samples {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.category-samples a {
    color: var(--stone-600);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 84px 56px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 22px;
    border: 1px solid rgba(221, 216, 207, 0.9);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sand);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-cover {
    overflow: hidden;
    border-radius: 16px;
}

.rank-cover img {
    width: 84px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose-500), var(--purple-600));
    font-weight: 900;
}

.rank-info h3 {
    margin: 0 0 5px;
    color: var(--stone-900);
    font-size: 18px;
}

.rank-info p {
    margin: 0 0 5px;
    color: var(--stone-700);
    font-size: 14px;
}

.rank-info span {
    color: var(--stone-600);
    font-size: 13px;
}

.sub-hero {
    position: relative;
    overflow: hidden;
    padding: 48px;
    border-radius: 30px;
    color: var(--stone-800);
    background: linear-gradient(135deg, #fff1f2, #faf5ff 55%, #fff);
    box-shadow: var(--shadow-sand);
}

.sub-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: var(--stone-700);
    font-size: 18px;
}

.filter-panel {
    position: relative;
    margin: 28px 0 0;
    padding: 18px;
    border: 1px solid rgba(221, 216, 207, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sand);
}

.filter-input {
    width: 100%;
    border: 1px solid var(--stone-200);
    outline: 0;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--sand-50);
    color: var(--stone-900);
}

.filter-selects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.filter-selects select {
    width: 100%;
    border: 1px solid var(--stone-200);
    border-radius: 16px;
    padding: 12px 14px;
    color: var(--stone-800);
    background: #fff;
}

.empty-state {
    display: none;
    margin: 18px 0 0;
    padding: 18px;
    border-radius: 18px;
    color: var(--stone-600);
    background: var(--stone-100);
    text-align: center;
    font-weight: 700;
}

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

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

.breadcrumb a {
    color: var(--rose-600);
    font-weight: 700;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(135deg, #fff, #fff1f2 48%, #faf5ff);
    box-shadow: var(--shadow-sand);
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow-strong);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-copy h1 {
    font-size: clamp(34px, 5vw, 64px);
}

.lead-text {
    max-width: 780px;
    margin: 18px 0;
    color: var(--stone-700);
    font-size: 19px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0;
}

.detail-meta-grid span {
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--stone-700);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(221, 216, 207, 0.86);
    font-weight: 700;
}

.player-panel {
    margin-top: 34px;
    padding: 18px;
    border-radius: 30px;
    background: var(--stone-900);
    box-shadow: var(--shadow-strong);
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #0f0c10;
}

.video-frame video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #fff;
    border: 0;
    background: radial-gradient(circle at center, rgba(225, 29, 72, 0.26), rgba(0, 0, 0, 0.62));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--rose-500), var(--purple-600));
    font-size: 32px;
    box-shadow: 0 24px 55px -18px rgba(225, 29, 72, 0.82);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 24px;
    margin-top: 34px;
}

.content-card {
    padding: 28px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(221, 216, 207, 0.9);
    box-shadow: var(--shadow-sand);
}

.content-card h2 {
    margin: 0 0 16px;
    color: var(--stone-900);
    font-size: 26px;
}

.content-card p {
    margin: 0 0 14px;
    color: var(--stone-700);
}

.site-footer {
    margin-top: 80px;
    color: var(--stone-200);
    background: var(--stone-900);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    display: inline-block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.footer-inner p {
    max-width: 560px;
    margin: 0;
    color: var(--stone-300, #c6bdb0);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-content: start;
}

.footer-links a {
    color: #fff;
    font-weight: 700;
}

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

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

    .hero-content {
        grid-template-columns: 1fr 280px;
    }

    .home-rank-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .nav-shell {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav,
    .top-search {
        display: none;
        width: 100%;
    }

    .main-nav.is-open,
    .top-search.is-open {
        display: flex;
    }

    .main-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 0;
    }

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

    .hero-slider,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        padding-top: 72px;
    }

    .hero-poster {
        max-width: 260px;
        transform: none;
    }

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

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

    .filter-selects,
    .detail-meta-grid,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

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

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

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

@media (max-width: 560px) {
    .container,
    .quick-panel,
    .hero-content,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-copy h1 {
        font-size: 42px;
    }

    .sub-hero,
    .detail-hero,
    .soft-panel {
        padding: 24px;
        border-radius: 24px;
    }

    .rank-item {
        grid-template-columns: 70px 42px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-cover img {
        width: 70px;
    }

    .rank-number {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }
}
