:root {
    --toffee-cream: #fff8f0;
    --toffee-light: #f5e6d3;
    --toffee-primary: #c87941;
    --toffee-secondary: #e5a76b;
    --toffee-brown: #6b4423;
    --toffee-dark: #2d1810;
    --paper: rgba(255, 255, 255, 0.82);
    --shadow: 0 20px 55px rgba(107, 68, 35, 0.14);
    --soft-shadow: 0 12px 30px rgba(107, 68, 35, 0.1);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--toffee-dark);
    background:
        radial-gradient(circle at top left, rgba(229, 167, 107, 0.24), transparent 36rem),
        linear-gradient(135deg, var(--toffee-light) 0%, var(--toffee-cream) 42%, #ffffff 100%);
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
    line-height: 1.65;
}

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

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.86);
    border-bottom: 1px solid rgba(245, 230, 211, 0.75);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
    box-shadow: 0 12px 25px rgba(200, 121, 65, 0.3);
    animation: float 6s ease-in-out infinite;
}

.brand-text,
.footer-brand {
    font-size: 1.38rem;
    background: linear-gradient(90deg, var(--toffee-primary), var(--toffee-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.main-nav a,
.mobile-links a,
.mobile-cats a {
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--toffee-brown);
    font-weight: 700;
    transition: 0.22s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-links a:hover,
.mobile-links a.active,
.mobile-cats a:hover {
    color: var(--toffee-primary);
    background: var(--toffee-light);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 999px;
    background: var(--toffee-cream);
    border: 1px solid rgba(229, 167, 107, 0.26);
}

.header-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
    border: 0;
    outline: none;
    color: var(--toffee-dark);
    background: transparent;
}

.header-search input {
    width: 220px;
    padding-left: 10px;
}

.header-search button,
.mobile-search button,
.menu-toggle,
.hero-controls button {
    border: 0;
    cursor: pointer;
}

.header-search button,
.mobile-search button {
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
}

.menu-toggle {
    display: none;
    padding: 10px 13px;
    border-radius: 999px;
    color: var(--toffee-primary);
    background: var(--toffee-light);
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-links,
.mobile-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

main {
    overflow: hidden;
}

.hero-wrap {
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto 70px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
}

.hero-stage {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-radius: 34px;
    box-shadow: var(--shadow);
    background: var(--toffee-dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: end;
    padding: 58px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 20%, rgba(229, 167, 107, 0.36), transparent 22rem),
        linear-gradient(0deg, rgba(45, 24, 16, 0.88), transparent 46%);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 720px;
    color: #ffffff;
}

.eyebrow,
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--toffee-primary);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-kicker {
    color: #ffe1bd;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2.3rem, 6vw, 5.8rem);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.lead-text {
    max-width: 760px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.08rem;
}

.hero-tags,
.genre-pills,
.tag-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

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

.hero-tags span,
.genre-pills span,
.tag-row span,
.tag-cloud a {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--toffee-brown);
    background: rgba(245, 230, 211, 0.72);
    font-size: 0.82rem;
    font-weight: 800;
}

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

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

.toffee-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.2s ease;
}

.toffee-btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
    box-shadow: 0 14px 30px rgba(200, 121, 65, 0.28);
}

.toffee-btn.ghost {
    color: var(--toffee-primary);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(229, 167, 107, 0.34);
}

.toffee-btn.text {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.toffee-btn:hover,
.category-tile:hover,
.movie-card:hover {
    transform: translateY(-5px);
}

.hero-poster {
    align-self: center;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

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

.hero-controls {
    position: absolute;
    left: 48px;
    right: 48px;
    bottom: 34px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-controls button {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 1.8rem;
}

.hero-dots {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dot.active {
    width: 36px;
    border-radius: 999px;
    background: var(--toffee-secondary);
}

.toffee-card,
.movie-card,
.category-tile,
.filter-panel,
.page-hero,
.detail-hero,
.player-shell,
.category-overview-card {
    border: 1px solid rgba(245, 230, 211, 0.9);
    background: var(--paper);
    border-radius: var(--radius-xl);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(10px);
}

.hero-side {
    padding: 28px;
    align-self: stretch;
}

.hero-side h2,
.section-head h2,
.filter-panel h2,
.detail-copy h2,
.category-overview-head h2 {
    margin: 0;
    color: var(--toffee-dark);
    font-size: clamp(1.6rem, 3vw, 2.45rem);
    line-height: 1.16;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.hero-side p {
    margin: 16px 0 22px;
    color: rgba(107, 68, 35, 0.78);
}

.hero-mini-grid,
.compact-grid {
    display: grid;
    gap: 14px;
}

.section-block,
.page-hero,
.detail-top,
.filter-panel,
.category-overview-list {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 72px;
}

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

.section-head a {
    color: var(--toffee-primary);
    font-weight: 900;
}

.inline-head {
    display: block;
}

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

.movie-card {
    overflow: hidden;
    transition: 0.24s ease;
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--toffee-light);
}

.poster-wrap img,
.compact-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.card-badge,
.card-year {
    position: absolute;
    top: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    background: rgba(45, 24, 16, 0.72);
    backdrop-filter: blur(6px);
}

.card-badge {
    left: 14px;
}

.card-year {
    right: 14px;
}

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

.movie-card h3,
.ranking-content h3,
.compact-card strong {
    margin: 0;
    color: var(--toffee-dark);
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: 950;
}

.movie-card p,
.ranking-content p,
.detail-copy p {
    color: rgba(107, 68, 35, 0.76);
}

.movie-card p,
.ranking-content p {
    display: -webkit-box;
    margin: 10px 0 14px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.compact-card span {
    color: rgba(107, 68, 35, 0.62);
    font-size: 0.85rem;
    font-weight: 800;
}

.tag-row {
    margin-top: 12px;
}

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

.category-tile {
    display: grid;
    place-items: center;
    min-height: 156px;
    padding: 24px 14px;
    text-align: center;
    transition: 0.24s ease;
}

.category-tile span,
.category-icon {
    display: block;
    margin-bottom: 10px;
    font-size: 2.2rem;
}

.category-tile strong {
    color: var(--toffee-dark);
    font-size: 1.05rem;
}

.category-tile em {
    margin-top: 5px;
    color: rgba(107, 68, 35, 0.62);
    font-style: normal;
    font-size: 0.86rem;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 28px;
    align-items: start;
}

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

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

.compact-card .card-link {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
}

.compact-card img {
    border-radius: 14px;
}

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

.card-body strong,
.card-body span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-aside {
    padding: 24px;
}

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

.ranking-list.small .ranking-card {
    grid-template-columns: 96px minmax(0, 1fr);
    padding: 10px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(245, 230, 211, 0.86);
}

.ranking-poster img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    border-radius: 16px;
    object-fit: cover;
}

.ranking-score {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 950;
    background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
}

.rank-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    color: #ffffff;
    background: var(--toffee-dark);
    font-weight: 950;
}

.tag-cloud {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.56);
}

.tag-cloud a:hover {
    color: #ffffff;
    background: var(--toffee-primary);
}

.page-hero {
    padding: 62px;
    background:
        radial-gradient(circle at 80% 12%, rgba(229, 167, 107, 0.25), transparent 22rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 248, 240, 0.76));
}

.page-hero h1 {
    max-width: 860px;
    color: var(--toffee-dark);
}

.page-hero p {
    max-width: 860px;
    color: rgba(107, 68, 35, 0.82);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
    gap: 22px;
    align-items: center;
    padding: 24px;
}

.filter-controls {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr);
    gap: 12px;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 16px;
    background: rgba(255, 248, 240, 0.96);
    border: 1px solid rgba(229, 167, 107, 0.28);
}

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

.category-overview-card {
    padding: 24px;
}

.category-overview-head {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
}

.detail-top {
    margin-top: 34px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(107, 68, 35, 0.7);
    font-weight: 800;
}

.breadcrumbs a {
    color: var(--toffee-primary);
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    padding: 30px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: var(--soft-shadow);
}

.detail-info h1 {
    color: var(--toffee-dark);
}

.lead-text {
    color: rgba(107, 68, 35, 0.82);
}

.genre-pills {
    margin-top: 20px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 18px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.28));
    cursor: pointer;
}

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

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--toffee-primary), var(--toffee-secondary));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    font-size: 2rem;
}

.player-cover strong {
    max-width: min(720px, 90%);
    font-size: clamp(1.3rem, 4vw, 2.7rem);
    line-height: 1.2;
    text-align: center;
}

.detail-copy {
    padding: 30px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.66);
    box-shadow: var(--soft-shadow);
}

.detail-copy h2 {
    margin-top: 0;
    margin-bottom: 12px;
}

.detail-copy p {
    margin: 0 0 24px;
    font-size: 1.05rem;
}

.compact-tags {
    padding: 0;
    background: transparent;
}

.site-footer {
    margin-top: 80px;
    padding: 52px 0 28px;
    color: var(--toffee-brown);
    background: linear-gradient(135deg, rgba(245, 230, 211, 0.7), rgba(255, 255, 255, 0.82));
    border-top: 1px solid rgba(245, 230, 211, 0.86);
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1.3fr;
    gap: 32px;
}

.footer-grid h2 {
    margin: 0 0 12px;
    color: var(--toffee-dark);
    font-size: 1rem;
}

.footer-grid p {
    max-width: 520px;
}

.footer-grid a {
    display: inline-flex;
    margin: 0 10px 8px 0;
    color: var(--toffee-brown);
    font-weight: 800;
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 30px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(229, 167, 107, 0.28);
    color: rgba(107, 68, 35, 0.62);
    font-size: 0.92rem;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@media (max-width: 1120px) {
    .hero-wrap,
    .split-section,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        min-height: 560px;
    }

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

    .hero-poster {
        display: none;
    }

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

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

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

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

    .header-inner {
        justify-content: space-between;
    }

    .hero-wrap,
    .section-block,
    .page-hero,
    .detail-top,
    .filter-panel,
    .category-overview-list {
        width: min(100% - 24px, 1280px);
        margin-bottom: 48px;
    }

    .hero-stage {
        min-height: 580px;
        border-radius: 24px;
    }

    .hero-slide,
    .page-hero {
        padding: 34px 24px;
    }

    .hero-controls {
        left: 24px;
        right: 24px;
    }

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

    .filter-controls,
    .detail-hero,
    .category-overview-head,
    .rank-row {
        grid-template-columns: 1fr;
    }

    .detail-hero {
        padding: 18px;
    }

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

@media (max-width: 560px) {
    .brand-text {
        font-size: 1.08rem;
    }

    .hero-wrap {
        margin-top: 18px;
    }

    .hero-stage {
        min-height: 620px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2.25rem;
    }

    .hero-actions,
    .detail-actions {
        flex-direction: column;
    }

    .toffee-btn {
        width: 100%;
    }

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

    .ranking-card,
    .ranking-list.small .ranking-card {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .compact-card .card-link {
        grid-template-columns: 74px minmax(0, 1fr);
    }
}
