:root {
    color-scheme: light;
    --page-bg: #fff7ed;
    --page-bg-soft: #fffbeb;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #fed7aa;
    --brand: #d97706;
    --brand-dark: #92400e;
    --accent: #f97316;
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 22px 60px rgba(146, 64, 14, 0.15);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    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 30px rgba(146, 64, 14, 0.08);
    backdrop-filter: blur(16px);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 14px 28px rgba(234, 88, 12, 0.28);
}

.brand-text {
    font-size: 24px;
    background: linear-gradient(90deg, #92400e, #f97316);
    -webkit-background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(217, 119, 6, 0.12);
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--brand-dark);
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 16px 18px;
}

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

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 14px;
    color: #374151;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.62);
}

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

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.54) 46%, rgba(0, 0, 0, 0.18));
}

.hero-content-wrap {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content {
    width: min(680px, 100%);
    color: #fff;
    padding-top: 34px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff;
    background: rgba(245, 158, 11, 0.92);
    box-shadow: 0 14px 38px rgba(245, 158, 11, 0.25);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-content h1,
.page-hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 950;
}

.hero-content p,
.page-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
}

.tag-row span {
    color: #92400e;
    background: #ffedd5;
}

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

.primary-button,
.ghost-button,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 850;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 16px 34px rgba(234, 88, 12, 0.32);
}

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

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.text-link:hover {
    transform: translateY(-2px);
}

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

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

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

.page-hero {
    color: #fff;
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.55), transparent 36%), linear-gradient(135deg, #78350f, #ea580c);
}

.compact-hero {
    padding: 72px 0 64px;
}

.compact-hero h1 {
    max-width: 900px;
}

.compact-hero p {
    max-width: 780px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

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

.search-panel {
    padding: 28px 0;
    background: rgba(255, 247, 237, 0.86);
    border-bottom: 1px solid var(--line);
}

.search-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.search-inner h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 900;
}

.search-inner p {
    margin: 0;
    color: var(--muted);
}

.search-box {
    flex: 0 1 420px;
    display: grid;
    gap: 8px;
    font-weight: 800;
    color: #92400e;
}

.search-box input {
    width: 100%;
    height: 48px;
    border: 1px solid #fdba74;
    border-radius: 16px;
    padding: 0 16px;
    color: var(--ink);
    background: #fff;
    outline: none;
    box-shadow: 0 10px 26px rgba(217, 119, 6, 0.08);
}

.search-box input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.stacked-search {
    align-items: stretch;
    flex-direction: column;
}

.stacked-search .search-box {
    width: min(560px, 100%);
    flex: none;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 0;
    border-radius: 999px;
    padding: 9px 15px;
    color: #92400e;
    background: #ffedd5;
    font-weight: 800;
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.content-section {
    padding: 56px 0;
}

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

.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 950;
    color: #111827;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-more,
.text-link {
    color: #92400e;
    background: #ffedd5;
}

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

.movie-card,
.rank-card,
.overview-card,
.story-card,
.side-card,
.category-tile {
    background: var(--card);
    border: 1px solid rgba(253, 186, 116, 0.7);
    box-shadow: var(--shadow);
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(146, 64, 14, 0.2);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #431407;
}

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

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

.year-badge,
.type-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
}

.year-badge {
    left: 10px;
    top: 10px;
}

.type-badge {
    right: 10px;
    bottom: 10px;
    background: rgba(217, 119, 6, 0.9);
}

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

.movie-card h3,
.rank-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card h3 a:hover,
.rank-card h3 a:hover,
.overview-card h2 a:hover {
    color: var(--brand);
}

.movie-meta,
.muted-line {
    color: #9a3412;
    font-size: 13px;
    font-weight: 750;
}

.movie-desc,
.rank-card p,
.overview-card p {
    color: var(--muted);
    line-height: 1.68;
}

.movie-desc {
    min-height: 72px;
    margin: 10px 0 12px;
    font-size: 14px;
}

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

.category-tile {
    overflow: hidden;
    border-radius: var(--radius);
    padding: 18px;
    transition: transform 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
}

.category-posters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.category-posters img {
    aspect-ratio: 3 / 4;
    width: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.category-tile h2,
.overview-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 950;
}

.category-tile p {
    min-height: 78px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.72;
}

.category-tile span {
    color: var(--brand);
    font-weight: 900;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    border-radius: 20px;
    padding: 12px;
}

.rank-poster {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: #431407;
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-body p {
    margin: 7px 0 0;
    font-size: 14px;
}

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

.overview-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 22px;
    align-items: center;
    border-radius: var(--radius);
    padding: 18px;
}

.overview-poster-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.overview-poster-row img {
    aspect-ratio: 3 / 4;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.category-list {
    align-items: stretch;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 12px;
}

.rank-num {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    font-weight: 950;
}

.detail-hero {
    padding: 64px 0;
    color: #fff;
    background: radial-gradient(circle at 20% 15%, rgba(251, 191, 36, 0.48), transparent 34%), linear-gradient(135deg, #111827, #78350f 56%, #ea580c);
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

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

.detail-info h1 {
    margin: 18px 0;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    font-weight: 950;
}

.detail-one-line {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
    line-height: 1.75;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 800;
}

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

.watch-section {
    padding: 50px 0 20px;
    background: #111827;
}

.watch-section h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 950;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #030712;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    background: #030712;
    cursor: pointer;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.48), rgba(120, 53, 15, 0.56));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-mark {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 18px 40px rgba(249, 115, 22, 0.4);
    font-size: 32px;
}

.player-cover span:last-child {
    font-size: 20px;
    font-weight: 950;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.story-card,
.side-card {
    border-radius: var(--radius);
    padding: 26px;
}

.story-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 950;
}

.story-card p {
    margin: 0 0 24px;
    color: #4b5563;
    font-size: 17px;
    line-height: 1.95;
}

.side-card dl {
    margin: 0;
    display: grid;
    gap: 12px;
}

.side-card dt {
    color: #9a3412;
    font-weight: 900;
}

.side-card dd {
    margin: -8px 0 4px;
    color: #374151;
    line-height: 1.6;
}

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

.site-footer {
    color: #fffbeb;
    background: linear-gradient(90deg, #78350f, #9a3412);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

.footer-brand {
    margin-bottom: 14px;
    font-size: 24px;
}

.site-footer p {
    color: #fed7aa;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #fed7aa;
}

.site-footer a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(253, 215, 170, 0.24);
    padding: 18px 16px;
    text-align: center;
    color: #fed7aa;
}

[hidden] {
    display: none !important;
}

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

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

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

    .detail-poster {
        width: min(320px, 100%);
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content-wrap {
        padding: 120px 0 92px;
    }

    .search-inner,
    .section-head,
    .footer-grid {
        align-items: stretch;
        flex-direction: column;
        display: flex;
    }

    .search-box {
        flex: none;
    }

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

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

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

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

    .brand-text {
        font-size: 20px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

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

    .rank-card {
        grid-template-columns: 82px 1fr;
    }

    .rank-row {
        grid-template-columns: 42px 1fr;
    }

    .rank-num {
        width: 38px;
        height: 38px;
        border-radius: 14px;
        font-size: 13px;
    }

    .compact-hero,
    .detail-hero {
        padding: 48px 0;
    }

    .story-card,
    .side-card {
        padding: 20px;
    }
}
