:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --ink: #2f1d0c;
    --muted: #8a5a2b;
    --brand: #b45309;
    --brand-strong: #c2410c;
    --brand-dark: #7c2d12;
    --card: #ffffff;
    --line: rgba(180, 83, 9, 0.18);
    --shadow: 0 20px 45px rgba(124, 45, 18, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 42%, #fff7ed 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

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

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

main {
    min-height: 70vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(146, 64, 14, 0.12);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #b45309, #c2410c);
    box-shadow: 0 14px 24px rgba(194, 65, 12, 0.25);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong,
.footer-brand strong {
    font-size: 20px;
    line-height: 1;
    background: linear-gradient(90deg, #92400e, #c2410c);
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    padding: 10px 16px;
    border-radius: 14px;
    color: #713f12;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    background: #fef3c7;
    color: #9a3412;
}

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fef3c7;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #78350f;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    padding: 12px 24px 18px;
    border-top: 1px solid var(--line);
    background: #fffaf0;
}

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

.hero-carousel {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: #111827;
}

.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,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    right: 24px;
    bottom: 120px;
    max-width: 760px;
    color: #ffffff;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    background: rgba(180, 83, 9, 0.92);
    color: #ffffff;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.hero-content h1 {
    margin: 20px 0 16px;
    font-size: clamp(42px, 8vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-content p {
    color: #ffedd5;
    max-width: 680px;
    margin: 0 0 28px;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.hero-actions,
.scroll-actions,
.hero-dots {
    display: flex;
    align-items: center;
    gap: 12px;
}

.primary-btn,
.ghost-btn,
.outline-btn,
.hero-search button,
.tile-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.hero-search button {
    color: #ffffff;
    background: linear-gradient(135deg, #b45309, #c2410c);
    box-shadow: 0 18px 30px rgba(194, 65, 12, 0.25);
    border: 0;
}

.primary-btn,
.ghost-btn,
.outline-btn {
    min-height: 48px;
    padding: 0 24px;
}

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

.outline-btn {
    color: #9a3412;
    border: 1px solid rgba(180, 83, 9, 0.28);
    background: #ffffff;
}

.primary-btn:hover,
.ghost-btn:hover,
.outline-btn:hover,
.hero-search button:hover,
.tile-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 34px rgba(194, 65, 12, 0.22);
}

.hero-control,
.scroll-actions button {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(8px);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    z-index: 4;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    z-index: 4;
}

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

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

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 70px;
    z-index: 5;
    display: flex;
    width: min(620px, calc(100% - 48px));
    transform: translateX(-50%);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 0 18px;
    font-size: 16px;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.82);
}

.hero-search button {
    min-width: 96px;
    min-height: 42px;
    cursor: pointer;
}

.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px 0;
}

.intro-band {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    padding-top: 56px;
}

.intro-band h2,
.section-head h2,
.page-hero h1,
.detail-copy h1,
.story-panel h2 {
    margin: 10px 0 0;
    color: #431407;
    line-height: 1.1;
}

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

.intro-band p {
    color: var(--muted);
    max-width: 760px;
    line-height: 1.8;
}

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

.section-head a {
    color: #9a3412;
    font-weight: 900;
}

.section-head.compact {
    margin-bottom: 18px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 10px 24px rgba(124, 45, 18, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(194, 65, 12, 0.35);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #27130a;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.04));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
}

.play-chip {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    padding: 10px 18px;
    background: rgba(180, 83, 9, 0.9);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #c2410c);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #431407;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin: 8px 0;
    color: #a16207;
    font-size: 13px;
    font-weight: 800;
}

.card-summary {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #7c4a20;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span,
.detail-tags a,
.tile-samples span {
    border-radius: 999px;
    background: #ffedd5;
    color: #9a3412;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

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

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 28px;
    padding: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, #92400e, #c2410c);
    box-shadow: var(--shadow);
    isolation: isolate;
}

.category-glow {
    position: absolute;
    width: 180px;
    height: 180px;
    right: -48px;
    top: -42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    z-index: -1;
}

.category-tile strong {
    display: block;
    font-size: 25px;
    margin-bottom: 12px;
}

.category-tile p {
    color: #ffedd5;
    line-height: 1.7;
    min-height: 56px;
}

.tile-entry {
    width: max-content;
    padding: 9px 16px;
    color: #9a3412;
    background: #ffffff;
    margin: 8px 0 16px;
}

.tile-samples span {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.split-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
}

.ranking-panel,
.fresh-panel,
.story-panel {
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 16px 32px rgba(124, 45, 18, 0.08);
    padding: 24px;
}

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

.ranking-link {
    display: grid;
    grid-template-columns: 44px 84px 1fr;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 18px;
    background: #fff7ed;
    transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-link:hover {
    transform: translateX(4px);
    background: #ffedd5;
}

.ranking-number {
    color: #c2410c;
    font-weight: 950;
    text-align: center;
}

.ranking-link img {
    width: 84px;
    height: 54px;
    border-radius: 14px;
    object-fit: cover;
}

.ranking-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.ranking-copy strong,
.ranking-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-copy small {
    color: #8a5a2b;
}

.movie-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 290px);
    gap: 20px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scroll-snap-type: x mandatory;
}

.movie-row .movie-card {
    scroll-snap-align: start;
}

.scroll-actions {
    position: static;
}

.scroll-actions button {
    position: static;
    color: #9a3412;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(124, 45, 18, 0.12);
}

.page-hero {
    position: relative;
    min-height: 330px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #7c2d12, #c2410c 62%, #f59e0b);
}

.page-hero > div {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 64px 24px;
}

.compact-hero {
    min-height: 280px;
}

.page-hero h1 {
    color: #ffffff;
    font-size: clamp(42px, 7vw, 64px);
}

.page-hero p {
    max-width: 720px;
    color: #ffedd5;
    font-size: 18px;
    line-height: 1.8;
}

.crumb {
    display: inline-flex;
    margin-bottom: 18px;
    color: #ffedd5;
    font-weight: 900;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
    margin-bottom: 26px;
}

.filter-input,
.filter-select {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    color: #431407;
    font: inherit;
    outline: 0;
    padding: 0 18px;
    box-shadow: 0 8px 18px rgba(124, 45, 18, 0.06);
}

.filter-input:focus,
.filter-select:focus {
    border-color: #c2410c;
    box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.12);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 760px;
    color: #ffffff;
    background: #180f0a;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.26;
    filter: blur(2px);
    transform: scale(1.02);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(24, 15, 10, 0.96));
}

.detail-shell {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #fed7aa;
    font-weight: 800;
    margin-bottom: 26px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-info {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.player-card {
    padding: 14px;
}

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

.watch-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.16));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

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

.player-start {
    width: 84px;
    height: 84px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #b45309, #c2410c);
    box-shadow: 0 18px 34px rgba(194, 65, 12, 0.42);
    cursor: pointer;
    font-size: 28px;
    transition: transform 0.2s ease;
}

.player-start:hover {
    transform: scale(1.06);
}

.player-overlay strong {
    max-width: 80%;
    text-align: center;
    font-size: clamp(22px, 4vw, 34px);
    line-height: 1.25;
}

.detail-info {
    overflow: hidden;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.detail-copy {
    padding: 24px;
}

.detail-copy h1 {
    color: #ffffff;
    font-size: clamp(30px, 4vw, 46px);
}

.detail-one-line {
    color: #ffedd5;
    line-height: 1.75;
    font-size: 17px;
}

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

.meta-list div {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
}

.meta-list dt {
    color: #fdba74;
    font-size: 12px;
    font-weight: 900;
}

.meta-list dd {
    margin: 5px 0 0;
    color: #ffffff;
    font-weight: 800;
}

.detail-content {
    margin-top: -74px;
    position: relative;
    z-index: 3;
}

.story-panel {
    max-width: 960px;
    margin: 0 auto;
    background: #ffffff;
}

.story-panel h2 {
    font-size: 30px;
    margin-top: 28px;
}

.story-panel h2:first-child {
    margin-top: 0;
}

.story-panel p {
    color: #5c3212;
    font-size: 17px;
    line-height: 2;
}

.detail-tags {
    margin-top: 26px;
}

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

.site-footer {
    margin-top: 86px;
    border-top: 1px solid var(--line);
    background: #fffaf0;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 38px 24px;
    display: grid;
    gap: 24px;
}

.footer-brand p,
.copyright {
    margin: 7px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    color: #9a3412;
    font-weight: 800;
}

.is-filtered-out {
    display: none;
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .brand-text small {
        display: none;
    }

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

    .hero-content {
        left: 24px;
        bottom: 138px;
    }

    .hero-control {
        display: none;
    }

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

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

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .detail-shell {
        padding-top: 26px;
    }
}

@media (max-width: 560px) {
    .header-inner {
        padding: 0 16px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-text strong {
        font-size: 17px;
    }

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

    .hero-content {
        bottom: 164px;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 24px;
    }

    .hero-search input {
        min-height: 42px;
    }

    .hero-search button {
        width: 100%;
    }

    .section-wrap {
        padding: 52px 16px 0;
    }

    .movie-grid,
    .mini-grid,
    .category-grid,
    .category-grid.large,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .page-hero > div,
    .detail-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .player-start {
        width: 70px;
        height: 70px;
    }
}
