:root {
    color-scheme: dark;
    --page-bg: #0f0702;
    --panel: rgba(44, 18, 6, 0.78);
    --panel-soft: rgba(74, 31, 10, 0.58);
    --line: rgba(251, 191, 36, 0.22);
    --gold: #facc15;
    --gold-strong: #f59e0b;
    --text: #fff7ed;
    --muted: #f5d0a1;
    --dark: #140803;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% -10%, rgba(251, 191, 36, 0.20), transparent 30%),
        radial-gradient(circle at 85% 10%, rgba(180, 83, 9, 0.18), transparent 36%),
        linear-gradient(180deg, #130802 0%, #1c0b03 40%, #0f0702 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

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

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #1c0b03;
    box-shadow: 0 12px 34px rgba(250, 204, 21, 0.28);
}

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

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

.nav-link,
.quick-cats a,
.footer-nav a {
    color: #f5d0a1;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
}

.nav-link:hover,
.nav-link.is-active {
    color: #1c0b03;
    background: #facc15;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(120, 53, 15, 0.38);
}

.quick-cats {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 0 12px;
}

.quick-cats a {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(120, 53, 15, 0.34);
    border: 1px solid rgba(251, 191, 36, 0.16);
    font-size: 13px;
}

.quick-cats a:hover,
.footer-nav a:hover {
    color: #facc15;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    margin: 28px 0 44px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    background: #1c0b03;
}

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

.hero-slide {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.62fr);
    align-items: center;
    gap: 48px;
    padding: 68px;
    opacity: 0;
    transform: scale(1.018);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 7, 2, 0.94) 0%, rgba(15, 7, 2, 0.75) 48%, rgba(15, 7, 2, 0.48) 100%),
        linear-gradient(0deg, rgba(15, 7, 2, 0.78), transparent 52%);
}

.hero-bg img {
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.03);
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    color: #fff7ed;
    text-shadow: 0 12px 42px rgba(0, 0, 0, 0.45);
}

.hero-summary,
.page-hero p,
.detail-one-line {
    margin: 22px 0 0;
    max-width: 760px;
    font-size: 18px;
    line-height: 1.9;
    color: #fed7aa;
}

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

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

.hero-tags span,
.tag-row span,
.chip {
    border: 1px solid rgba(251, 191, 36, 0.28);
    color: #fde68a;
    background: rgba(120, 53, 15, 0.42);
    border-radius: 999px;
}

.hero-tags span,
.tag-row span {
    padding: 7px 12px;
    font-size: 13px;
}

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

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

.primary-btn {
    color: #1c0b03;
    background: linear-gradient(135deg, #facc15, #fb923c);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
}

.ghost-btn,
.section-more {
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.3);
    background: rgba(120, 53, 15, 0.38);
}

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

.hero-poster {
    position: relative;
    z-index: 2;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.34);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56);
    transform: rotate(2deg);
}

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

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 68px;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    background: rgba(253, 230, 138, 0.35);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 54px;
    background: #facc15;
}

.search-band,
.content-section,
.rank-panel,
.category-overview-card,
.player-section,
.detail-text {
    margin: 34px 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(67, 28, 9, 0.72), rgba(20, 8, 3, 0.84));
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.25);
}

.search-band {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
    align-items: start;
}

.search-copy h2,
.section-head h2,
.rank-head h2,
.category-overview-head h2,
.detail-text h2,
.player-section h2,
.ranking-info h2 {
    margin: 0;
    color: #fff7ed;
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.search-copy p,
.section-head p,
.category-card p,
.category-overview-head p,
.ranking-info p,
.detail-text p,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.search-box {
    display: grid;
    gap: 8px;
    width: 100%;
}

.search-box span {
    color: #fde68a;
    font-weight: 800;
}

.search-box input,
.rank-search {
    width: 100%;
    height: 54px;
    border-radius: 18px;
    border: 1px solid rgba(251, 191, 36, 0.26);
    padding: 0 18px;
    color: #fff7ed;
    background: rgba(15, 7, 2, 0.7);
    outline: none;
}

.search-box input:focus,
.rank-search:focus {
    border-color: #facc15;
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.12);
}

.small-search {
    max-width: 420px;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
    gap: 18px;
}

.featured-grid {
    grid-column: 1 / -1;
}

.latest-grid,
.mini-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.18);
    border-radius: 22px;
    background: rgba(20, 8, 3, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.55);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.poster-link,
.category-cover,
.ranking-poster,
.detail-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(67, 28, 9, 0.64);
}

.poster-img,
.category-cover img,
.ranking-poster img,
.detail-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-img,
.category-card:hover .category-cover img,
.ranking-card:hover .ranking-poster img {
    transform: scale(1.06);
}

.movie-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #1c0b03;
    background: #facc15;
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 14px;
}

.movie-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #fff7ed;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.38;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover,
.ranking-info h2 a:hover,
.category-overview-head h2 a:hover {
    color: #facc15;
}

.movie-meta {
    margin: 8px 0 0;
    color: #fcd9ad;
    font-size: 13px;
}

.movie-desc {
    display: -webkit-box;
    min-height: 62px;
    margin: 10px 0 0;
    overflow: hidden;
    color: #f3c58f;
    font-size: 13px;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.compact-card .movie-desc,
.compact-card .tag-row {
    display: none;
}

.compact-card .movie-title {
    min-height: 44px;
    font-size: 15px;
}

.section-head,
.category-overview-head,
.rank-head,
.filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.slim-head {
    margin-bottom: 18px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

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

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

.category-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(251, 191, 36, 0.18);
    border-radius: 22px;
    background: rgba(20, 8, 3, 0.66);
}

.category-card h3 {
    margin: 0 0 8px;
    color: #fff7ed;
    font-size: 20px;
    font-weight: 900;
}

.category-cover {
    border-radius: 18px;
}

.category-cover img {
    min-height: 150px;
}

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

.mini-links a {
    padding: 5px 10px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(120, 53, 15, 0.36);
    font-size: 12px;
}

.rank-panel {
    position: sticky;
    top: 106px;
    align-self: start;
    margin: 0;
}

.rank-head a {
    color: #facc15;
    font-weight: 800;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 42px 52px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(251, 191, 36, 0.13);
    border-radius: 18px;
    background: rgba(15, 7, 2, 0.48);
}

.rank-item img {
    width: 52px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-no {
    color: #facc15;
    font-size: 20px;
    font-weight: 900;
}

.rank-title {
    display: block;
    overflow: hidden;
    color: #fff7ed;
    font-weight: 900;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-meta {
    grid-column: 3 / 4;
    color: #f3c58f;
    font-size: 12px;
}

.page-hero,
.detail-hero {
    margin: 28px 0 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.20), transparent 34%),
        linear-gradient(145deg, rgba(67, 28, 9, 0.82), rgba(20, 8, 3, 0.90));
    box-shadow: var(--shadow);
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 28px;
    align-items: center;
    padding: 46px;
    overflow: hidden;
}

.compact-hero {
    display: block;
}

.category-hero img {
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.36);
}

.category-overview-card {
    margin: 0;
}

.chip-row {
    justify-content: flex-end;
}

.chip {
    min-height: 38px;
    padding: 0 14px;
}

.chip.is-active,
.chip:hover {
    color: #1c0b03;
    background: #facc15;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 70px 96px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(251, 191, 36, 0.18);
    border-radius: 22px;
    background: rgba(20, 8, 3, 0.66);
}

.rank-number {
    color: #facc15;
    font-size: 28px;
    font-weight: 1000;
}

.ranking-poster {
    border-radius: 16px;
}

.ranking-poster img {
    height: 132px;
}

.ranking-info h2 {
    font-size: 22px;
}

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

.detail-poster {
    border-radius: 28px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

.detail-copy h1 {
    font-size: clamp(36px, 5vw, 72px);
}

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

.detail-meta div {
    padding: 14px;
    border: 1px solid rgba(251, 191, 36, 0.16);
    border-radius: 18px;
    background: rgba(15, 7, 2, 0.54);
}

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

.detail-meta dd {
    margin: 6px 0 0;
    color: #fff7ed;
    font-weight: 800;
}

.large-tags span {
    font-size: 14px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 0;
    color: #f3c58f;
    font-size: 14px;
}

.breadcrumb a {
    color: #fde68a;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(251, 191, 36, 0.30);
    background: #050200;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48);
}

.video-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050200;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #fff7ed;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.56));
    transition: opacity 0.22s ease;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #1c0b03;
    background: #facc15;
    font-size: 34px;
    box-shadow: 0 18px 50px rgba(250, 204, 21, 0.32);
}

.player-overlay strong {
    font-size: 20px;
    letter-spacing: 0.08em;
}

.video-shell.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.detail-text h2 + p {
    margin-top: 12px;
}

.detail-text h2:not(:first-child) {
    margin-top: 28px;
}

.filter-empty {
    margin: 18px 0 0;
    color: #fde68a;
    font-weight: 800;
}

.site-footer {
    margin-top: 56px;
    padding: 42px 0 28px;
    border-top: 1px solid var(--line);
    background: rgba(15, 7, 2, 0.72);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
    gap: 28px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: flex-end;
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    color: #c28b55;
    font-size: 13px;
}

@media (max-width: 980px) {
    .hero-slide,
    .detail-hero,
    .page-hero,
    .search-band,
    .split-section,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .hero-slide {
        padding: 40px;
    }

    .hero-poster {
        max-width: 300px;
    }

    .rank-panel {
        position: static;
    }

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

    .footer-nav {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    main,
    .header-inner,
    .quick-cats,
    .footer-inner,
    .copyright {
        width: min(100% - 22px, 1180px);
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: 72px;
        right: 11px;
        display: none;
        min-width: 190px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(20, 8, 3, 0.96);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: grid;
    }

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

    .hero-carousel {
        min-height: 690px;
        margin-top: 16px;
    }

    .hero-slide {
        padding: 26px;
        gap: 24px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 40px;
    }

    .hero-summary,
    .page-hero p,
    .detail-one-line {
        font-size: 15px;
    }

    .hero-dots {
        left: 26px;
        bottom: 22px;
    }

    .content-section,
    .search-band,
    .rank-panel,
    .category-overview-card,
    .player-section,
    .detail-text,
    .detail-hero,
    .page-hero {
        padding: 20px;
        border-radius: 22px;
    }

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

    .filter-toolbar,
    .section-head,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .chip-row {
        justify-content: flex-start;
    }

    .ranking-card {
        grid-template-columns: 48px 76px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .ranking-poster img {
        height: 104px;
    }

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

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

@media (max-width: 430px) {
    .movie-grid,
    .latest-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }

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