:root {
    color-scheme: dark;
    --bg: #130b02;
    --bg-soft: #231304;
    --panel: rgba(58, 28, 6, 0.72);
    --panel-strong: rgba(93, 49, 10, 0.88);
    --line: rgba(251, 191, 36, 0.22);
    --text: #fff7ed;
    --muted: #fed7aa;
    --subtle: #fbbf24;
    --brand: #f59e0b;
    --brand-deep: #b45309;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.26), transparent 34rem),
        radial-gradient(circle at top right, rgba(194, 65, 12, 0.22), transparent 28rem),
        linear-gradient(180deg, #1b0f04 0%, #140b02 42%, #080401 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(52, 28, 8, 0.82);
    border-bottom: 1px solid var(--line);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #78350f;
    background: linear-gradient(135deg, #fde68a, #f59e0b 55%, #c2410c);
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.36);
}

.brand-text {
    font-size: 1.35rem;
}

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

.site-nav a {
    padding: 9px 13px;
    border-radius: 999px;
    color: #ffedd5;
    transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: #78350f;
    background: #fcd34d;
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.filter-bar input,
.filter-bar select {
    color: var(--text);
    background: rgba(120, 53, 15, 0.52);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 999px;
    outline: none;
}

.top-search input {
    width: 180px;
    padding: 10px 14px;
}

.top-search button,
.primary-btn,
.ghost-btn {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    transition: 0.22s ease;
}

.top-search button,
.primary-btn {
    color: #451a03;
    font-weight: 800;
    background: linear-gradient(135deg, #fde68a, #f59e0b 58%, #ea580c);
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.34);
}

.top-search button {
    padding: 10px 16px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
}

.ghost-btn {
    color: #ffedd5;
    border: 1px solid rgba(253, 230, 138, 0.34);
    background: rgba(255, 255, 255, 0.1);
}

.primary-btn:hover,
.top-search button:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #ffedd5;
}

.hero-carousel {
    position: relative;
    min-height: 700px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

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

.hero-slide {
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
    background-image:
        linear-gradient(90deg, rgba(15, 8, 2, 0.96) 0%, rgba(27, 15, 4, 0.78) 46%, rgba(27, 15, 4, 0.34) 100%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.28), transparent 22rem),
        linear-gradient(180deg, transparent 0%, rgba(8, 4, 1, 0.92) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 46px;
    align-items: center;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 14px;
    padding: 7px 13px;
    border: 1px solid rgba(253, 230, 138, 0.26);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(120, 53, 15, 0.42);
    font-size: 0.86rem;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 5.4rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.lead-text {
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.9;
}

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

.hero-poster {
    display: block;
    border: 1px solid rgba(253, 230, 138, 0.3);
    border-radius: 34px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.hero-poster:hover img {
    transform: scale(1.06);
}

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

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

.hero-dot.is-active {
    background: #fbbf24;
}

.section-wrap,
.page-hero,
.detail-hero {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.section-wrap {
    padding: 72px 0;
}

.section-head {
    margin-bottom: 28px;
}

.section-head h2,
.content-card h2 {
    margin: 0 0 10px;
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    letter-spacing: -0.04em;
}

.section-head p {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

.row-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
}

.text-link {
    color: #fde68a;
    font-weight: 800;
}

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

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

.category-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(92, 45, 7, 0.82), rgba(33, 17, 3, 0.88));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.category-main {
    display: block;
    min-height: 188px;
    padding: 24px;
}

.category-main span,
.card-meta,
.rank-meta,
.detail-meta,
.breadcrumb {
    color: #fcd34d;
    font-size: 0.88rem;
}

.category-main h2 {
    margin: 14px 0 10px;
    font-size: 1.45rem;
}

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

.category-links {
    display: grid;
    gap: 1px;
    background: rgba(251, 191, 36, 0.12);
}

.category-links a {
    padding: 12px 18px;
    background: rgba(35, 19, 4, 0.82);
    color: #ffedd5;
}

.category-card:hover,
.movie-card:hover,
.rank-item:hover,
.content-card:hover {
    border-color: rgba(251, 191, 36, 0.6);
    transform: translateY(-3px);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 220px;
    gap: 14px;
    margin: 0 0 26px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
}

.filter-bar label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    padding: 0 15px;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.18);
    border-radius: var(--radius);
    background: rgba(52, 28, 8, 0.66);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    transition: 0.22s ease;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.36s ease;
}

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #451a03;
    background: #fbbf24;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.34);
}

.card-content {
    padding: 18px;
}

.card-meta,
.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.movie-card h3,
.rank-info h3 {
    margin: 10px 0 8px;
    font-size: 1.16rem;
    line-height: 1.35;
}

.movie-card p,
.rank-info p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.7;
}

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.16);
    font-size: 0.8rem;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 92px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(52, 28, 8, 0.66);
    transition: 0.22s ease;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: #451a03;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    border-radius: 16px;
}

.rank-cover img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.page-hero,
.detail-hero {
    padding: 70px 0 24px;
}

.compact-hero {
    min-height: 270px;
    display: grid;
    align-items: center;
}

.compact-hero > div,
.detail-layout,
.content-card,
.video-shell {
    border: 1px solid var(--line);
    border-radius: 32px;
    background: linear-gradient(145deg, rgba(92, 45, 7, 0.76), rgba(18, 9, 2, 0.86));
    box-shadow: var(--shadow);
}

.compact-hero > div {
    padding: 34px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
}

.detail-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.detail-info .primary-btn {
    width: max-content;
}

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

.video-shell {
    overflow: hidden;
    padding: 14px;
}

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

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

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 14px;
    color: #fff7ed;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(8, 4, 1, 0.1), rgba(8, 4, 1, 0.78));
}

.play-icon {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.38);
}

.play-icon::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 23px solid #451a03;
}

.video-player.is-playing .play-cover {
    opacity: 0;
    pointer-events: none;
}

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

.content-card {
    padding: 28px;
    transition: 0.22s ease;
}

.content-card p {
    margin: 0;
    color: var(--muted);
    line-height: 2;
    font-size: 1.02rem;
}

.empty-result {
    display: none;
    margin: 24px 0 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
}

.empty-result.is-visible {
    display: block;
}

.site-footer {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 46px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.site-footer strong {
    color: var(--text);
}

.site-footer p {
    margin: 8px 0 0;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

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

@media (max-width: 1024px) {
    .hero-content,
    .detail-layout,
    .story-section {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 280px;
        transform: none;
    }

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

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

@media (max-width: 820px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .menu-toggle {
        display: block;
    }

    .site-nav,
    .top-search {
        display: none;
        width: 100%;
    }

    .site-header.is-open .site-nav,
    .site-header.is-open .top-search {
        display: flex;
    }

    .site-nav {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }

    .top-search input {
        width: 100%;
        flex: 1;
    }

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

    .hero-content {
        padding-top: 36px;
        gap: 26px;
    }

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

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

    .rank-item {
        grid-template-columns: 48px 72px minmax(0, 1fr);
        gap: 12px;
    }

    .site-footer {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2.3rem;
    }

    .section-wrap {
        padding: 48px 0;
    }

    .compact-hero > div,
    .detail-layout,
    .content-card {
        padding: 22px;
        border-radius: 24px;
    }

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

    .rank-info p,
    .card-content p {
        font-size: 0.94rem;
    }
}
