:root {
    --bg: #f7f3ee;
    --paper: #ffffff;
    --ink: #1c1917;
    --muted: #6b625b;
    --line: rgba(69, 64, 60, 0.12);
    --earth: #8a5f3e;
    --earth-dark: #5f3d28;
    --earth-soft: #efe3d8;
    --canyon: #a33f25;
    --stone: #292524;
    --shadow: 0 18px 50px rgba(41, 37, 36, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: radial-gradient(circle at top left, rgba(163, 63, 37, 0.12), transparent 32rem), var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--stone);
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--earth), var(--canyon));
    box-shadow: 0 10px 24px rgba(138, 95, 62, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #57534e;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--earth-dark);
    background: var(--earth-soft);
}

.nav-link:hover,
.mobile-link:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 16px;
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: linear-gradient(135deg, #1c1917, #292524 48%, #5f3d28);
}

.hero-carousel::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.23;
    background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 58px 58px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    background-image: linear-gradient(90deg, rgba(28, 25, 23, 0.96) 0%, rgba(28, 25, 23, 0.78) 47%, rgba(28, 25, 23, 0.28) 100%), var(--hero-image);
    background-position: center;
    background-size: cover;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 24%, rgba(245, 158, 11, 0.24), transparent 26rem), linear-gradient(to top, rgba(28, 25, 23, 0.82), transparent 58%);
}

.hero-content {
    position: relative;
    max-width: 1180px;
    min-height: 72vh;
    margin: 0 auto;
    padding: 86px 20px 72px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 360px;
    align-items: center;
    gap: 48px;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d6b28c;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0;
    color: #fff;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: #6a432d;
    background: #f4e7dc;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span,
.detail-tags span {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.btn,
.search-bar button,
.search-tools button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 14px;
    border: 0;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.search-bar button:hover,
.search-tools button:hover {
    transform: translateY(-2px);
}

.btn.primary,
.search-bar button,
.search-tools button {
    color: #fff;
    background: linear-gradient(135deg, var(--earth), var(--canyon));
    box-shadow: 0 14px 32px rgba(138, 95, 62, 0.28);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.btn.soft {
    color: #5f3d28;
    background: #f4e7dc;
}

.btn.small {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
}

.hero-poster,
.detail-poster,
.overview-cover,
.poster,
.category-card {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(135deg, rgba(41, 37, 36, 0.24), rgba(163, 63, 37, 0.35)), var(--poster);
    background-position: center;
    background-size: cover;
}

.hero-poster {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.hero-poster span,
.overview-cover span {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    font-size: 26px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

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

.hero-search-panel {
    max-width: 980px;
    margin: -34px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

.search-bar,
.search-tools {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.search-bar input,
.search-tools input,
.search-tools select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: #f7f3ee;
    color: var(--ink);
    outline: none;
}

.search-tools select {
    max-width: 180px;
}

.max-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.section {
    padding-top: 66px;
    padding-bottom: 6px;
}

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

.section-head.slim {
    margin-bottom: 16px;
}

.section-head h2 {
    margin: 6px 0 0;
    color: var(--stone);
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.section-kicker {
    color: var(--earth);
}

.section-more {
    color: var(--earth-dark);
    font-weight: 800;
}

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

.category-card {
    min-height: 178px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 60px rgba(41, 37, 36, 0.16);
}

.category-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28, 25, 23, 0.82), rgba(28, 25, 23, 0.12));
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 1;
}

.category-card strong {
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.category-card em {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    font-style: normal;
    line-height: 1.55;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: 0 12px 36px rgba(41, 37, 36, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card.mini {
    display: grid;
    grid-template-columns: 72px 1fr;
    border-radius: 18px;
}

.poster {
    display: block;
    aspect-ratio: 16 / 10;
}

.movie-card.mini .poster {
    aspect-ratio: auto;
    min-height: 100%;
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28, 25, 23, 0.62), transparent 56%);
}

.poster-year,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-year {
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.58);
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
    padding: 16px;
}

.movie-card.mini .card-body {
    padding: 10px 12px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: var(--stone);
    font-size: 17px;
    line-height: 1.38;
    font-weight: 850;
}

.movie-card.mini h3 {
    font-size: 14px;
}

.card-body p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 42px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.movie-card.mini .card-body p,
.movie-card.mini .tag-row,
.movie-card.mini .card-meta {
    display: none;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: #78716c;
    font-size: 12px;
    font-weight: 700;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.rank-box {
    position: sticky;
    top: 82px;
    padding: 22px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.rank-box.tall {
    max-height: calc(100vh - 110px);
    overflow: auto;
}

.rank-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-row a {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.rank-row:last-child a {
    border-bottom: 0;
}

.rank-num {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #6b625b;
    background: #f1ebe5;
    font-weight: 900;
}

.rank-row.top .rank-num {
    color: #fff;
    background: linear-gradient(135deg, var(--earth), var(--canyon));
}

.rank-title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

.rank-heat {
    color: var(--earth);
    font-size: 12px;
    font-weight: 800;
}

.page-main,
.detail-main {
    padding-bottom: 68px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(90deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.62)), var(--hero-image);
    background-position: center;
    background-size: cover;
}

.compact-hero {
    background: linear-gradient(135deg, #1c1917, #5f3d28 58%, #a33f25);
}

.page-hero-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 82px 20px 74px;
}

.category-hero .page-hero-inner {
    padding-top: 92px;
    padding-bottom: 78px;
}

.category-overview-list {
    display: grid;
    gap: 22px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding: 20px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.overview-cover {
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
}

.overview-body h2 {
    margin: 4px 0 8px;
    font-size: 28px;
    font-weight: 900;
}

.overview-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.overview-movies {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
}

.breadcrumb {
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #78716c;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--earth-dark);
    font-weight: 800;
}

.detail-hero {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 36px;
    padding: 34px;
    border-radius: 34px;
    box-shadow: var(--shadow);
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 16% 16%, rgba(255, 255, 255, 0.18), transparent 28rem);
}

.detail-poster,
.detail-info {
    position: relative;
    z-index: 1;
}

.detail-poster {
    min-height: 460px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.32);
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.detail-one {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    line-height: 1.85;
}

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

.detail-meta div {
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.detail-meta dt {
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
}

.detail-meta dd {
    margin: 4px 0 0;
    color: #fff;
    font-weight: 800;
}

.player-section {
    padding-top: 36px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #0c0a09;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 70px rgba(41, 37, 36, 0.24);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #0c0a09;
}

.player-button {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(138, 95, 62, 0.42), rgba(12, 10, 9, 0.74));
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.player-button.hidden {
    display: none;
}

.player-icon {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--earth), var(--canyon));
    box-shadow: 0 18px 42px rgba(163, 63, 37, 0.34);
    font-size: 26px;
}

.player-state {
    position: absolute;
    left: 18px;
    bottom: 14px;
    z-index: 3;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

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

.text-card {
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    box-shadow: 0 12px 36px rgba(41, 37, 36, 0.08);
}

.text-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 900;
}

.text-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.site-footer {
    margin-top: 78px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #78716c;
}

.footer-inner p {
    margin: 0;
}

@media (max-width: 1080px) {
    .hero-content,
    .split-layout,
    .detail-hero,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

    .rank-box {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav.open {
        display: grid;
        gap: 6px;
    }

    .hero-content {
        min-height: 640px;
        padding-top: 62px;
    }

    .hero-actions,
    .search-bar,
    .search-tools,
    .section-head,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .search-tools select {
        max-width: none;
    }

    .category-grid,
    .movie-grid,
    .movie-grid.compact,
    .overview-movies,
    .detail-text {
        grid-template-columns: 1fr;
    }

    .detail-hero {
        margin: 0 20px;
        padding: 22px;
    }

    .detail-poster {
        min-height: 360px;
    }

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

    .player-shell {
        border-radius: 18px;
    }
}
