:root {
    color-scheme: dark;
    --site-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.78);
    --panel-bg-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-soft: #cbd5e1;
    --accent: #f59e0b;
    --accent-strong: #d97706;
    --accent-soft: rgba(245, 158, 11, 0.14);
    --border: rgba(148, 163, 184, 0.16);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    --radius: 22px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.site-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(30, 64, 175, 0.24), transparent 36rem),
        var(--site-bg);
    color: var(--text-main);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
    z-index: -1;
}

img.no-image {
    opacity: 0;
}

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

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
}

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

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

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #facc15);
    color: #111827;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.34);
}

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

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

.nav-link,
.mobile-nav-link {
    color: var(--text-soft);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--accent);
    background: var(--accent-soft);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.85);
    padding: 9px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text-main);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

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

.site-main {
    padding-top: 68px;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    isolation: isolate;
}

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

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

.hero-media,
.hero-media img,
.hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-media {
    background: linear-gradient(135deg, #111827, #020617);
}

.hero-media img {
    object-fit: cover;
    filter: saturate(1.05) contrast(1.02);
}

.hero-shade {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.26) 100%),
        linear-gradient(0deg, var(--site-bg) 0%, transparent 38%),
        radial-gradient(circle at 22% 36%, rgba(245, 158, 11, 0.22), transparent 24rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(var(--container), calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 80px 0 110px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border: 1px solid rgba(245, 158, 11, 0.38);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(245, 158, 11, 0.08);
    font-weight: 700;
}

.hero-content h1 {
    max-width: 820px;
    margin: 24px 0 18px;
    font-size: clamp(42px, 7vw, 88px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 720px;
    margin: 0;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.tag-row,
.detail-tags,
.footer-links,
.category-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span,
.stat-pill,
.category-cloud a,
.filter-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--accent);
    background: rgba(15, 23, 42, 0.68);
    text-decoration: none;
}

.hero-tags span,
.detail-tags span,
.category-cloud a,
.filter-pill {
    padding: 8px 12px;
}

.tag-row span {
    padding: 5px 8px;
    font-size: 12px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #facc15);
    color: #111827;
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.btn-secondary {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.72);
    color: var(--text-main);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 42px;
    z-index: 5;
    width: min(var(--container), calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

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

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

.section-block,
.detail-section,
.player-section,
.category-hero,
.catalog-hero {
    padding: 54px 0;
}

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

.section-heading h2,
.category-hero h1,
.catalog-hero h1,
.detail-title {
    margin: 0;
    color: var(--text-main);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(26px, 4vw, 42px);
}

.section-heading p,
.category-hero p,
.catalog-hero p {
    margin: 8px 0 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.section-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 800;
}

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

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

.movie-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.66);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(30, 41, 59, 0.84);
    box-shadow: var(--shadow);
}

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

.movie-link {
    color: inherit;
    text-decoration: none;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.24), transparent 36%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

.compact-grid .poster-wrap {
    aspect-ratio: 3 / 4;
}

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.06) 55%, transparent);
    opacity: 0.72;
}

.poster-year {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 10px;
    color: #111827;
    background: rgba(245, 158, 11, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.94);
    color: #111827;
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36);
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3 {
    min-height: 2.8em;
    margin: 0 0 10px;
    color: var(--text-main);
    font-size: 17px;
    line-height: 1.4;
    font-weight: 800;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--accent);
}

.movie-card-body p {
    min-height: 3.4em;
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.search-input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.68);
    color: var(--text-main);
    padding: 0 18px;
    outline: none;
}

.search-input:focus {
    border-color: rgba(245, 158, 11, 0.58);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.search-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    padding: 0 14px;
    white-space: nowrap;
}

.feature-panels {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
}

.panel-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.panel-card h2,
.panel-card h3 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 900;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.58);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.38);
    background: rgba(30, 41, 59, 0.82);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 900;
}

.rank-item strong {
    display: block;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-item span,
.rank-item small {
    color: var(--text-muted);
}

.category-hero,
.catalog-hero {
    background:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.18), transparent 32rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0));
}

.category-hero h1,
.catalog-hero h1 {
    font-size: clamp(36px, 6vw, 68px);
}

.category-cloud {
    margin-top: 24px;
}

.category-cloud a:hover,
.filter-pill:hover {
    border-color: rgba(245, 158, 11, 0.52);
    background: var(--accent-soft);
}

.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 34px;
}

.pager a,
.pager span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text-soft);
    background: rgba(15, 23, 42, 0.72);
    text-decoration: none;
}

.pager a:hover,
.pager a.is-current {
    color: #111827;
    border-color: transparent;
    background: var(--accent);
}

.detail-hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    isolation: isolate;
}

.detail-bg,
.detail-bg img,
.detail-bg::after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.detail-bg {
    z-index: -2;
    background: #020617;
}

.detail-bg img {
    object-fit: cover;
    filter: blur(2px) saturate(1.05);
    transform: scale(1.04);
}

.detail-bg::after {
    content: "";
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.24)),
        linear-gradient(0deg, var(--site-bg), transparent 50%);
}

.detail-hero-inner {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 120px 0 64px;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-poster {
    border: 1px solid var(--border);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: var(--shadow);
}

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

.detail-title {
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
}

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

.detail-intro {
    max-width: 840px;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.85;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

.player-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.58));
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.player-card.is-started .player-cover {
    opacity: 0;
}

.player-trigger {
    pointer-events: auto;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #facc15);
    color: #111827;
    font-size: 32px;
    box-shadow: 0 24px 60px rgba(245, 158, 11, 0.34);
    transition: transform 0.2s ease;
}

.player-trigger:hover {
    transform: scale(1.08);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
}

.article-card,
.sidebar-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    background: rgba(15, 23, 42, 0.72);
}

.article-card h2,
.sidebar-card h2 {
    margin: 0 0 16px;
    color: var(--text-main);
    font-size: 26px;
    font-weight: 900;
}

.article-card p {
    margin: 0 0 18px;
    color: var(--text-soft);
    line-height: 1.9;
}

.meta-list {
    display: grid;
    gap: 12px;
    color: var(--text-soft);
}

.meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.meta-list span:first-child {
    color: var(--text-muted);
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.88);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 28px;
    padding: 42px 0;
}

.footer-grid p,
.footer-bottom {
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 900;
}

.footer-links a {
    color: var(--text-soft);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    border-top: 1px solid var(--border);
    padding: 20px 0 28px;
    text-align: center;
}

.empty-result {
    display: none;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    color: var(--text-muted);
    text-align: center;
}

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

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

    .feature-panels,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .detail-hero-inner {
        grid-template-columns: 220px minmax(0, 1fr);
    }
}

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

    .mobile-toggle {
        display: block;
    }

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

    .hero-content {
        padding: 70px 0 100px;
    }

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

    .hero-content p,
    .detail-intro {
        font-size: 16px;
    }

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

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

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

    .movie-card-body h3 {
        font-size: 15px;
    }

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

    .detail-hero {
        min-height: auto;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        padding-top: 96px;
    }

    .detail-poster {
        max-width: 240px;
    }

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

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

    .hero-actions,
    .detail-actions {
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}
