:root {
    color-scheme: dark;
    --bg: #0f0a06;
    --bg-soft: #1b1009;
    --panel: rgba(42, 24, 12, 0.82);
    --panel-solid: #25150c;
    --line: rgba(255, 211, 165, 0.16);
    --text: #fff8ed;
    --muted: #f7cfa9;
    --muted-soft: #b99075;
    --brand: #f59e0b;
    --brand-strong: #f97316;
    --brand-dark: #92400e;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 22px;
    --max: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.13), transparent 36rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-shell {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(15, 10, 6, 0.78);
    backdrop-filter: blur(20px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #1b1009;
    box-shadow: 0 14px 35px rgba(245, 158, 11, 0.35);
}

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

.site-nav a {
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
    transition: 0.24s ease;
}

.site-nav a:hover {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.06);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: currentColor;
}

.home-hero {
    position: relative;
    overflow: hidden;
    min-height: 760px;
    background: linear-gradient(110deg, #7c2d12 0%, #9a3412 42%, #78350f 100%);
}

.hero-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(255, 237, 213, 0.26), transparent 20rem),
        radial-gradient(circle at 84% 28%, rgba(251, 146, 60, 0.28), transparent 26rem),
        linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(15, 10, 6, 0.94));
    pointer-events: none;
}

.hero-shell {
    position: relative;
    z-index: 1;
    padding: 82px 0 56px;
}

.hero-track {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
    align-items: center;
    gap: 58px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(26px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 13px;
    border: 1px solid rgba(255, 237, 213, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffedd5;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.hero-copy h1 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(44px, 8vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.08em;
}

.hero-copy p {
    max-width: 680px;
    margin: 24px 0 0;
    color: #ffedd5;
    font-size: clamp(18px, 2.3vw, 24px);
}

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

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

.hero-tags span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid rgba(255, 237, 213, 0.18);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.16);
    color: var(--muted);
    font-size: 13px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.24s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #fbbf24, #f97316);
    color: #221104;
    box-shadow: 0 16px 40px rgba(249, 115, 22, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 52px rgba(249, 115, 22, 0.48);
}

.btn-ghost {
    border: 1px solid rgba(255, 237, 213, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #ffedd5;
}

.btn-ghost:hover {
    border-color: rgba(255, 237, 213, 0.36);
    background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border: 1px solid rgba(255, 237, 213, 0.22);
    border-radius: 34px;
    background: rgba(0, 0, 0, 0.16);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::after,
.poster-wrap::after,
.category-media::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.76));
    pointer-events: none;
}

.hero-poster img,
.poster-wrap img,
.category-media img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #7c2d12, #f97316);
}

.hero-controls {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

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

.hero-dot.is-active {
    width: 56px;
    background: #ffedd5;
}

.hero-rail {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-top: 38px;
}

.hero-rail a {
    display: grid;
    grid-template-columns: 54px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 10px;
    border: 1px solid rgba(255, 237, 213, 0.16);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.16);
    color: #ffedd5;
    font-weight: 700;
    transition: 0.24s ease;
}

.hero-rail a:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
}

.hero-rail img {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #7c2d12, #f97316);
}

.quick-search-section {
    margin-top: -28px;
    position: relative;
    z-index: 3;
}

.search-panel {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(37, 21, 12, 0.9);
    box-shadow: var(--shadow);
}

.site-search {
    width: 100%;
    min-height: 54px;
    padding: 0 20px;
    border: 1px solid rgba(255, 237, 213, 0.16);
    border-radius: 16px;
    outline: none;
    background: rgba(0, 0, 0, 0.22);
    color: var(--text);
}

.site-search::placeholder {
    color: var(--muted-soft);
}

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

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.section-heading p,
.page-hero p,
.footer-grid p {
    max-width: 680px;
    margin: 12px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(37, 21, 12, 0.72);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    transition: 0.24s ease;
}

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

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

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    margin: 0;
    background: linear-gradient(135deg, #7c2d12, #f97316);
}

.poster-wrap figcaption {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.poster-wrap figcaption span,
.rank-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.56);
    color: #ffedd5;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    color: #221104;
}

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

.movie-card-body h2 {
    display: -webkit-box;
    min-height: 52px;
    margin: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 18px;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 10px 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-compact .movie-card-body h2 {
    min-height: 48px;
    font-size: 16px;
}

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

.category-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(37, 21, 12, 0.74);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transition: 0.24s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.4);
}

.category-card > a {
    display: grid;
    grid-template-columns: 210px 1fr;
    min-height: 250px;
}

.category-media {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #7c2d12, #f97316);
}

.category-info {
    padding: 28px;
}

.category-info h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.category-info p {
    color: var(--muted);
}

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

.mini-links a {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    gap: 34px;
    align-items: start;
}

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

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

.ranking-item a {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(37, 21, 12, 0.78);
    transition: 0.24s ease;
}

.ranking-item a:hover {
    border-color: rgba(251, 191, 36, 0.42);
    background: rgba(73, 40, 17, 0.74);
}

.ranking-num {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    font-weight: 900;
}

.ranking-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.ranking-meta {
    color: var(--muted-soft);
    font-size: 13px;
}

.text-link {
    display: inline-flex;
    margin-top: 20px;
    color: #fbbf24;
    font-weight: 800;
}

.page-main {
    min-height: 60vh;
}

.page-hero {
    padding: 80px 0 54px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.18), transparent 24rem),
        linear-gradient(115deg, #4a210d, #1b1009 68%);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--muted-soft);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--text);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 28px;
}

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(37, 21, 12, 0.82);
    color: var(--muted);
    cursor: pointer;
    transition: 0.24s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
    border-color: rgba(251, 191, 36, 0.44);
    background: rgba(251, 191, 36, 0.12);
    color: var(--text);
}

.detail-hero {
    padding: 54px 0 70px;
    background:
        radial-gradient(circle at 84% 20%, rgba(251, 146, 60, 0.2), transparent 25rem),
        linear-gradient(115deg, #3a1c0d, #0f0a06 70%);
}

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

.detail-poster {
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: linear-gradient(135deg, #7c2d12, #f97316);
    box-shadow: var(--shadow);
}

.detail-copy .lead-text {
    max-width: 820px;
    color: #ffedd5;
    font-size: 20px;
}

.detail-meta {
    margin: 24px 0 12px;
}

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

.player-section {
    margin-top: -34px;
}

.stream-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 237, 213, 0.22);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

.watch-video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(251, 191, 36, 0.22), transparent 20rem),
        rgba(0, 0, 0, 0.48);
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.watch-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    padding: 0 28px;
    border: 1px solid rgba(255, 237, 213, 0.32);
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    color: #221104;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
    cursor: pointer;
}

.play-icon {
    width: 0;
    height: 0;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-left: 16px solid currentColor;
}

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

.article-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(37, 21, 12, 0.72);
}

.article-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.article-card p {
    margin: 0;
    color: var(--muted);
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(37, 21, 12, 0.72);
    color: var(--muted);
    text-align: center;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: #0b0704;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 40px;
    padding: 48px 0;
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

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

.footer-links a {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--text);
    border-color: rgba(251, 191, 36, 0.42);
}

.footer-bottom {
    padding: 18px 0 30px;
    color: var(--muted-soft);
    font-size: 14px;
}

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

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

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

    .category-card > a {
        grid-template-columns: 170px 1fr;
    }
}

@media (max-width: 880px) {
    .site-shell {
        width: min(100% - 24px, var(--max));
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(15, 10, 6, 0.96);
        box-shadow: var(--shadow);
    }

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

    .site-nav a {
        border-color: var(--line);
    }

    .home-hero {
        min-height: 820px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        align-items: start;
    }

    .hero-poster {
        width: min(100%, 340px);
        margin: 0 auto;
        transform: none;
    }

    .hero-rail {
        grid-template-columns: 1fr;
    }

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

    .category-grid,
    .split-section,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-card > a,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .category-media {
        aspect-ratio: 16 / 8;
    }

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

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

    .ranking-item a {
        grid-template-columns: 44px 1fr;
    }

    .ranking-meta {
        grid-column: 2;
    }
}

@media (max-width: 560px) {
    .brand {
        font-size: 16px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

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

    .hero-shell {
        padding-top: 48px;
    }

    .home-hero {
        min-height: 780px;
    }

    .hero-copy h1 {
        font-size: clamp(38px, 14vw, 56px);
    }

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

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

    .poster-wrap {
        aspect-ratio: 16 / 20;
    }

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

    .page-hero {
        padding: 54px 0 38px;
    }

    .article-card,
    .category-info {
        padding: 22px;
    }

    .stream-player {
        border-radius: 20px;
    }
}
