:root {
    color-scheme: light;
    --bg: #fff7ed;
    --surface: #ffffff;
    --surface-soft: #fffaf0;
    --ink: #1f2937;
    --muted: #6b7280;
    --brand: #f59e0b;
    --brand-deep: #ea580c;
    --brand-soft: #fef3c7;
    --line: rgba(245, 158, 11, 0.22);
    --shadow: 0 24px 70px rgba(120, 53, 15, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.35), transparent 34rem),
        linear-gradient(135deg, #fff7ed 0%, #fffbeb 48%, #fef3c7 100%);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

img {
    max-width: 100%;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 251, 235, 0.86);
    border-bottom: 1px solid rgba(245, 158, 11, 0.18);
    backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 900;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.logo-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    box-shadow: 0 10px 30px rgba(234, 88, 12, 0.28);
}

.logo-text {
    font-size: 1.15rem;
}

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

.nav-link,
.mobile-link,
.footer-links a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
}

.nav-link:hover,
.nav-link.is-active {
    color: #92400e;
    background: rgba(251, 191, 36, 0.24);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box,
.wide-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(120, 53, 15, 0.06);
}

.search-box {
    padding: 8px 14px;
}

.search-icon {
    color: var(--brand-deep);
    font-size: 1.05rem;
}

.search-box input,
.wide-search input {
    width: 220px;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: none;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: var(--brand-deep);
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 14px;
    background: #ffffff;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(245, 158, 11, 0.16);
}

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

.mobile-panel-inner {
    display: grid;
    gap: 8px;
    padding: 14px 0 18px;
}

.mobile-link {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.66);
    font-weight: 700;
}

.hero {
    position: relative;
    overflow: hidden;
}

.hero-stage {
    position: relative;
    min-height: 620px;
    background: #1f2937;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 620px;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.58) 45%, rgba(17, 24, 39, 0.1) 100%),
        linear-gradient(0deg, rgba(255, 247, 237, 0.94) 0%, rgba(255, 247, 237, 0.05) 30%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 620px;
}

.hero-copy {
    max-width: 680px;
    color: #ffffff;
}

.hero-tags,
.meta-row,
.detail-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tags span,
.hero-genre-row span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
}

.hero-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.6rem, 7vw, 5.5rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

.hero-copy p {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 2vw, 1.35rem);
    line-height: 1.8;
}

.hero-genre-row,
.hero-actions,
.filter-row,
.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-genre-row {
    margin-top: 22px;
}

.hero-actions {
    margin-top: 32px;
}

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    box-shadow: 0 14px 34px rgba(234, 88, 12, 0.32);
}

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

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.primary-button.full {
    width: 100%;
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
    font-size: 2rem;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    width: 36px;
    background: var(--brand);
}

.search-panel,
.content-section {
    margin-top: 48px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-copy span,
.section-kicker,
.sub-hero span {
    color: var(--brand-deep);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.search-copy h2,
.section-heading h2,
.sub-hero h1,
.detail-article h1 {
    margin: 8px 0 10px;
    color: var(--ink);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.search-copy h2,
.section-heading h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.search-copy p,
.section-heading p,
.sub-hero p,
.site-footer p,
.movie-card p,
.detail-article p {
    color: var(--muted);
    line-height: 1.75;
}

.wide-search {
    min-height: 60px;
    padding: 0 22px;
}

.wide-search input {
    width: 100%;
    font-size: 1rem;
}

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

.section-more,
.card-link {
    color: #92400e;
    background: rgba(251, 191, 36, 0.18);
}

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

.category-page-grid,
.rank-card-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 40px rgba(120, 53, 15, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: 0 24px 58px rgba(120, 53, 15, 0.18);
}

.poster-link,
.category-tile,
.detail-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #fde68a, #fed7aa);
}

.poster-link {
    aspect-ratio: 2 / 3;
}

.poster-link img,
.category-tile img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

.movie-card:hover img,
.category-tile:hover img {
    transform: scale(1.08);
}

.poster-shade,
.category-tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(17, 24, 39, 0.62));
}

.play-chip {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

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

.meta-row {
    color: #92400e;
    font-size: 0.78rem;
    font-weight: 800;
}

.movie-card h3 {
    margin: 10px 0 8px;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.35;
}

.movie-card h3 a {
    color: inherit;
    text-decoration: none;
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.4em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.92rem;
}

.tag-row {
    margin: 14px 0;
}

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    color: #6b7280;
    background: #f9fafb;
}

.compact-card .movie-card-body {
    padding: 14px;
}

.compact-card h3 {
    font-size: 0.98rem;
}

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

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

.category-tile {
    min-height: 210px;
    padding: 20px;
    border-radius: 26px;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 18px 42px rgba(120, 53, 15, 0.12);
}

.category-tile img,
.category-tile-shade {
    position: absolute;
    inset: 0;
}

.category-tile-shade {
    background:
        linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.76)),
        linear-gradient(135deg, rgba(245, 158, 11, 0.56), rgba(234, 88, 12, 0.22));
}

.category-tile strong,
.category-tile em {
    position: relative;
    z-index: 2;
    display: block;
}

.category-tile strong {
    margin-top: 106px;
    font-size: 1.45rem;
    font-style: normal;
    font-weight: 900;
}

.category-tile em {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    line-height: 1.6;
}

.rank-list {
    display: grid;
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) minmax(140px, 280px);
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    color: var(--ink);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateX(5px);
    box-shadow: 0 16px 34px rgba(120, 53, 15, 0.13);
}

.rank-row span,
.rank-badge {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    border-radius: 999px;
    font-weight: 900;
    text-align: center;
}

.rank-row span {
    padding: 8px 0;
}

.rank-row em {
    color: var(--muted);
    font-style: normal;
    text-align: right;
}

.rank-badge {
    position: absolute;
    z-index: 3;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    font-size: 0.75rem;
}

.sub-hero {
    padding: 86px 0 40px;
    background:
        radial-gradient(circle at 20% 10%, rgba(251, 191, 36, 0.32), transparent 28rem),
        linear-gradient(135deg, #fffbeb, #fff7ed);
}

.sub-hero-inner {
    max-width: 780px;
}

.sub-hero h1 {
    font-size: clamp(2.3rem, 6vw, 4.8rem);
}

.filter-row {
    margin-top: 28px;
}

.filter-button {
    min-height: 38px;
    padding: 0 16px;
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    font-weight: 900;
}

.filter-button.is-active,
.filter-button:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 28px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #92400e;
    text-decoration: none;
    font-weight: 800;
}

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

.detail-main,
.detail-aside {
    min-width: 0;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 28px;
    background: #111827;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.28), rgba(17, 24, 39, 0.68));
}

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

.player-overlay span {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.32);
    font-size: 2rem;
}

.detail-article,
.aside-box {
    margin-top: 24px;
    padding: 28px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 42px rgba(120, 53, 15, 0.1);
}

.detail-kicker {
    color: #92400e;
    font-weight: 900;
}

.detail-article h1 {
    font-size: clamp(2rem, 5vw, 3.8rem);
}

.detail-one-line {
    color: #374151 !important;
    font-size: 1.16rem;
    font-weight: 700;
}

.detail-tags {
    margin: 22px 0 28px;
}

.detail-article h2,
.aside-box h2 {
    margin: 26px 0 12px;
    color: var(--ink);
    font-size: 1.45rem;
    font-weight: 900;
}

.detail-article h2:first-child,
.aside-box h2:first-child {
    margin-top: 0;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.aside-box dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px 16px;
    margin: 0 0 24px;
}

.aside-box dt {
    color: #92400e;
    font-weight: 900;
}

.aside-box dd {
    margin: 0;
    color: #374151;
}

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

.site-footer {
    margin-top: 72px;
    padding: 42px 0;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.58);
    border-top: 1px solid rgba(245, 158, 11, 0.18);
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.footer-logo {
    margin-bottom: 8px;
    font-size: 1.15rem;
}

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

.footer-links a {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.16);
    font-weight: 800;
}

.js-movie-card.is-hidden {
    display: none;
}

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

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

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

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

    .detail-aside {
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 24px;
        align-items: start;
    }

    .aside-box {
        margin-top: 0;
    }
}

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

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

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

    .hero-copy {
        padding: 0 18px;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .section-heading,
    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .rank-row {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .rank-row em {
        grid-column: 2;
        text-align: left;
    }

    .detail-aside {
        display: block;
    }

    .aside-box {
        margin-top: 24px;
    }
}

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

    .header-inner {
        min-height: 64px;
    }

    .logo-mark {
        width: 38px;
        height: 38px;
        border-radius: 14px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .hero-stage,
    .hero-image,
    .hero-content {
        min-height: 520px;
    }

    .hero-copy h1 {
        font-size: 2.7rem;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

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

    .category-tile {
        min-height: 190px;
    }

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

    .detail-article,
    .aside-box {
        padding: 22px;
        border-radius: 22px;
    }
}
