:root {
    --toffee-primary: #C87941;
    --toffee-secondary: #E5A76B;
    --toffee-light: #F5E6D3;
    --toffee-cream: #FFF8F0;
    --toffee-caramel: #B8784F;
    --toffee-brown: #8B5A3C;
    --toffee-dark: #6B4423;
    --cloud-white: #FFFFFF;
    --cloud-soft: #F9F9F9;
    --shadow-cloud: 0 20px 60px rgba(139, 90, 60, 0.14);
    --shadow-soft: 0 10px 30px rgba(139, 90, 60, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--toffee-dark);
    background:
        radial-gradient(circle at 10% 10%, rgba(229, 167, 107, 0.22), transparent 28rem),
        radial-gradient(circle at 90% 0%, rgba(200, 121, 65, 0.16), transparent 24rem),
        linear-gradient(135deg, var(--toffee-cream), #ffffff 48%, rgba(245, 230, 211, 0.48));
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(245, 230, 211, 0.8);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 24px rgba(107, 68, 35, 0.08);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 18px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
    box-shadow: 0 10px 24px rgba(200, 121, 65, 0.28);
    font-weight: 800;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--toffee-primary), var(--toffee-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
    display: none;
}

.desktop-nav a {
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--toffee-brown);
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
    transition: 0.25s ease;
}

.desktop-nav a:hover {
    color: var(--toffee-primary);
    background: var(--toffee-light);
}

.nav-search {
    display: flex;
    align-items: center;
    width: 240px;
    min-width: 210px;
    border-radius: 999px;
    background: var(--toffee-cream);
    border: 1px solid rgba(200, 121, 65, 0.16);
    overflow: hidden;
}

.nav-search input,
.mobile-panel input,
.wide-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--toffee-dark);
    background: transparent;
}

.nav-search input {
    padding: 10px 0 10px 16px;
}

.nav-search button,
.mobile-panel button,
.wide-search button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
    padding: 10px 15px;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--toffee-primary);
    background: var(--toffee-light);
    font-size: 24px;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
}

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

.mobile-panel form {
    display: flex;
    border: 1px solid rgba(200, 121, 65, 0.18);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.mobile-panel input {
    padding: 12px 14px;
}

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.mobile-panel nav a {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--toffee-cream);
    color: var(--toffee-brown);
    font-weight: 650;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #2a160c;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(7px) saturate(1.18);
    transform: scale(1.08);
    opacity: 0.72;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(29, 13, 4, 0.92), rgba(107, 68, 35, 0.72), rgba(255, 248, 240, 0.16)),
        linear-gradient(0deg, rgba(29, 13, 4, 0.85), transparent 55%);
}

.hero-content {
    position: relative;
    display: grid;
    width: min(1180px, calc(100% - 32px));
    min-height: 680px;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    align-items: center;
    gap: 48px;
    margin: 0 auto;
    padding: 92px 0 72px;
    color: #fff;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--toffee-primary);
    background: rgba(255, 248, 240, 0.78);
    border: 1px solid rgba(229, 167, 107, 0.42);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.hero-text h1 {
    margin: 22px 0 16px;
    font-size: clamp(44px, 7vw, 88px);
    line-height: 0.98;
    letter-spacing: -0.05em;
    text-shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
}

.hero-text p {
    margin: 0;
    max-width: 620px;
    color: rgba(255, 248, 240, 0.92);
    font-size: clamp(17px, 2vw, 23px);
}

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

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

.hero-tags span,
.detail-tags a,
.tag-list span {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(255, 248, 240, 0.86);
    color: var(--toffee-primary);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 750;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
    box-shadow: 0 12px 26px rgba(200, 121, 65, 0.26);
}

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

.btn-soft {
    color: var(--toffee-primary);
    background: rgba(255, 248, 240, 0.88);
}

.hero-poster {
    position: relative;
    display: block;
    padding: 10px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-cloud);
    backdrop-filter: blur(18px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.25;
    object-fit: cover;
    border-radius: 26px;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    font-size: 38px;
    transform: translateY(-50%);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: 0.25s ease;
}

.hero-dot.active {
    width: 30px;
    background: var(--toffee-secondary);
}

.section-block {
    padding: 64px 0;
}

.intro-block,
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.section-head.compact {
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    position: relative;
    display: inline-block;
    margin: 16px 0 0;
    color: var(--toffee-dark);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 70%;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--toffee-secondary), transparent);
}

.section-desc {
    max-width: 680px;
    color: var(--toffee-brown);
    font-size: 18px;
}

.section-link,
.rank-panel a {
    color: var(--toffee-primary);
    font-weight: 800;
}

.wide-search {
    display: flex;
    width: min(470px, 100%);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(200, 121, 65, 0.16);
    box-shadow: var(--shadow-soft);
}

.wide-search input {
    padding: 16px 20px;
}

.wide-search button {
    padding-inline: 22px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(245, 230, 211, 0.88);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(8px);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    content-visibility: auto;
    contain-intrinsic-size: 360px 560px;
}

.movie-card:hover {
    border-color: rgba(229, 167, 107, 0.7);
    box-shadow: var(--shadow-cloud);
    transform: translateY(-6px);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--toffee-light), var(--toffee-cream));
}

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    color: #fff;
    border-radius: 999px;
    background: rgba(107, 68, 35, 0.78);
    backdrop-filter: blur(12px);
    font-size: 12px;
    font-weight: 800;
}

.movie-card-body {
    padding: 16px;
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: var(--toffee-dark);
    font-size: 20px;
    line-height: 1.25;
}

.movie-card h3 a:hover {
    color: var(--toffee-primary);
}

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 13px;
    overflow: hidden;
    color: var(--toffee-brown);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--toffee-primary);
    font-size: 13px;
    font-weight: 750;
}

.tag-list span {
    background: var(--toffee-cream);
    font-size: 12px;
    padding: 4px 9px;
}

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

.category-card {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 170px;
    padding: 22px;
    border-radius: 24px;
    color: #fff;
    background: var(--toffee-dark);
    box-shadow: var(--shadow-soft);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    transition: transform 0.45s ease;
}

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

.category-card span,
.category-card p {
    position: relative;
    z-index: 1;
}

.category-card span {
    display: block;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 850;
}

.category-card p {
    max-width: 92%;
    margin: 0;
    color: rgba(255, 248, 240, 0.9);
}

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

.rank-panel,
.copy-card,
.copy-side,
.player-card,
.category-overview-card {
    border: 1px solid rgba(245, 230, 211, 0.9);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.rank-panel {
    padding: 24px;
}

.rank-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item a {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: var(--toffee-cream);
    transition: 0.25s ease;
}

.rank-item a:hover {
    color: var(--toffee-primary);
    transform: translateX(4px);
}

.rank-no {
    grid-row: span 2;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
    font-weight: 900;
}

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

.rank-meta {
    color: var(--toffee-brown);
    font-size: 13px;
}

.page-hero {
    padding: 82px 0 60px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(107, 68, 35, 0.92), rgba(200, 121, 65, 0.82)),
        radial-gradient(circle at 20% 20%, rgba(255, 248, 240, 0.28), transparent 28rem);
}

.page-hero h1 {
    max-width: 860px;
    margin: 18px 0 14px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 248, 240, 0.9);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: rgba(255, 248, 240, 0.86);
    font-weight: 700;
}

.breadcrumb a:hover {
    color: var(--toffee-secondary);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 190px 190px 190px;
    gap: 12px;
    margin-bottom: 18px;
}

.filter-bar input,
.filter-bar select {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(200, 121, 65, 0.18);
    border-radius: 16px;
    background: #fff;
    color: var(--toffee-dark);
}

.filter-bar:not(.search-filter) {
    grid-template-columns: minmax(220px, 1fr) 190px;
}

.result-line {
    min-height: 28px;
    margin-bottom: 20px;
    color: var(--toffee-brown);
    font-weight: 700;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
}

.category-cover {
    overflow: hidden;
    border-radius: 22px;
}

.category-cover img {
    width: 100%;
    height: 100%;
    min-height: 230px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 14px 0 8px;
    color: var(--toffee-dark);
    font-size: 26px;
}

.category-overview-card p {
    color: var(--toffee-brown);
}

.sample-line {
    font-size: 14px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #2a160c;
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: blur(8px) saturate(1.12);
    transform: scale(1.08);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(29, 13, 4, 0.92), rgba(107, 68, 35, 0.70));
}

.detail-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    align-items: center;
    gap: 42px;
    min-height: 560px;
    padding: 72px 0;
}

.detail-poster {
    padding: 10px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow-cloud);
    backdrop-filter: blur(14px);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.2;
    object-fit: cover;
    border-radius: 22px;
}

.detail-info h1 {
    margin: 18px 0;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 760px;
    margin: 0 0 18px;
    color: rgba(255, 248, 240, 0.93);
    font-size: 20px;
}

.detail-meta {
    margin-bottom: 18px;
    color: rgba(255, 248, 240, 0.82);
    font-weight: 700;
}

.detail-tags {
    margin-bottom: 28px;
}

.player-card {
    overflow: hidden;
    padding: 14px;
    background: rgba(29, 13, 4, 0.92);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.68));
    font-size: 20px;
    font-weight: 850;
}

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

.play-symbol {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    color: var(--toffee-primary);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
    font-size: 38px;
}

.detail-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
}

.copy-card,
.copy-side {
    padding: 28px;
}

.copy-card h2,
.copy-side h2,
.rank-panel h2,
.site-footer h2 {
    margin: 0 0 14px;
    color: var(--toffee-dark);
}

.copy-card p {
    margin: 0 0 24px;
    color: var(--toffee-brown);
    font-size: 17px;
}

.copy-side dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.copy-side div {
    display: grid;
    gap: 3px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(245, 230, 211, 0.9);
}

.copy-side dt {
    color: var(--toffee-primary);
    font-weight: 850;
}

.copy-side dd {
    margin: 0;
    color: var(--toffee-brown);
}

.sticky-panel {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow: auto;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid rgba(245, 230, 211, 0.9);
    background: linear-gradient(135deg, var(--toffee-light), var(--toffee-cream), #fff);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
    padding: 46px 0 24px;
}

.footer-grid p {
    max-width: 480px;
    color: var(--toffee-brown);
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: var(--toffee-brown);
}

.footer-links a:hover {
    color: var(--toffee-primary);
}

.footer-copy {
    padding: 18px 0 28px;
    color: var(--toffee-brown);
    font-size: 14px;
}

@media (max-width: 1120px) {
    .desktop-nav {
        max-width: 520px;
    }

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

    .split-layout,
    .ranking-layout {
        grid-template-columns: 1fr;
    }

    .sticky-panel {
        position: static;
        max-height: none;
    }
}

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

    .menu-toggle {
        display: grid;
        place-items: center;
    }

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

    .hero-content {
        gap: 28px;
        padding-top: 78px;
    }

    .hero-poster,
    .detail-poster {
        width: min(360px, 82vw);
        margin: 0 auto;
    }

    .intro-block,
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-grid,
    .category-overview-grid,
    .detail-copy,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar,
    .filter-bar:not(.search-filter) {
        grid-template-columns: 1fr;
    }
}

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

    .logo-text {
        font-size: 19px;
    }

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

    .hero-control {
        display: none;
    }

    .hero-text h1,
    .detail-info h1,
    .page-hero h1 {
        letter-spacing: -0.03em;
    }

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

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

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

    .movie-card p,
    .tag-list {
        display: none;
    }

    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .player-card {
        padding: 6px;
        border-radius: 18px;
    }

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