:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --muted: #94a3b8;
    --text: #f8fafc;
    --line: rgba(148, 163, 184, 0.22);
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.18);
    --orange: #f97316;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.15), transparent 30rem),
        radial-gradient(circle at 82% 10%, rgba(249, 115, 22, 0.13), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.is-nav-open {
    overflow: hidden;
}

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

img {
    display: block;
    max-width: 100%;
    background: rgba(15, 23, 42, 0.9);
}

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    border-bottom: 1px solid transparent;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.72));
    backdrop-filter: blur(14px);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
    border-color: var(--line);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 0 34px rgba(245, 158, 11, 0.45);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong,
.footer-brand strong {
    font-size: 1.35rem;
    line-height: 1;
    background: linear-gradient(90deg, #fcd34d, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.78rem;
}

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

.main-nav a {
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.15);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.hero {
    position: relative;
    height: 78vh;
    min-height: 620px;
    overflow: hidden;
}

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

.hero-slide {
    opacity: 0;
    transition: opacity 0.9s ease;
}

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

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.64) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.4) 35%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 86px;
    padding-top: 110px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fbbf24;
    font-weight: 700;
    margin-bottom: 18px;
}

.eyebrow::before {
    content: "";
    width: 48px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.6rem, 6vw, 5.9rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 700px;
    margin: 22px 0 0;
    color: #dbe4ef;
    font-size: clamp(1rem, 1.7vw, 1.22rem);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary,
.filter-btn,
.search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.search-submit {
    color: #fff;
    padding: 13px 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.34);
}

.btn-primary:hover,
.search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 55px rgba(245, 158, 11, 0.48);
}

.btn-secondary {
    color: #fde68a;
    padding: 12px 20px;
    border: 1px solid rgba(245, 158, 11, 0.36);
    background: rgba(15, 23, 42, 0.55);
}

.hero-dots {
    position: absolute;
    left: max(16px, calc((100vw - 1180px) / 2));
    bottom: 38px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.62);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.page-main {
    padding: 118px 0 74px;
}

.index-main {
    padding-top: 0;
}

.section {
    margin-top: 74px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    letter-spacing: -0.03em;
}

.section-desc {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.search-panel {
    position: relative;
    margin-top: -46px;
    z-index: 5;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.84);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.search-box input,
.local-tools input,
.local-tools select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--text);
    outline: none;
    background: rgba(2, 6, 23, 0.72);
    padding: 0 16px;
}

.search-results {
    display: none;
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: var(--shadow);
}

.search-results.is-visible {
    display: grid;
}

.search-result {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 14px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
}

.search-result:last-child {
    border-bottom: 0;
}

.search-result img {
    width: 80px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
}

.search-result strong {
    display: block;
    margin-bottom: 4px;
}

.search-result span {
    color: var(--muted);
    font-size: 0.86rem;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card,
.category-card,
.info-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.18);
}

.movie-card {
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(15, 23, 42, 0.92);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.card-poster img,
.mini-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 62%);
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-poster::after {
    opacity: 1;
}

.card-duration,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    color: #fff;
    font-size: 0.78rem;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
}

.card-play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(245, 158, 11, 0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 16px;
}

.card-meta,
.card-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.83rem;
}

.card-meta a {
    color: #fbbf24;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 1.05rem;
    line-height: 1.42;
}

.movie-card h3 a:hover,
.mini-card h3 a:hover {
    color: #fbbf24;
}

.movie-card p {
    min-height: 48px;
    margin: 0;
    color: #aebbd0;
    font-size: 0.92rem;
    line-height: 1.65;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 14px 0;
}

.card-tags span,
.detail-tags span {
    color: #cbd5e1;
    font-size: 0.78rem;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.36);
}

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

.mini-card {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.6);
}

.mini-poster {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
}

.mini-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.mini-card p {
    margin: 0 0 8px;
    color: #aebbd0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.mini-card span {
    color: var(--muted);
    font-size: 0.8rem;
}

.category-card {
    position: relative;
    padding: 24px;
    min-height: 188px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.25), transparent 54%);
    pointer-events: none;
}

.category-card h2,
.category-card p,
.category-card a {
    position: relative;
}

.category-card h2 {
    margin: 0 0 12px;
}

.category-card p {
    color: #aebbd0;
    line-height: 1.7;
}

.category-card a {
    color: #fbbf24;
    font-weight: 800;
}

.local-tools {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.filter-btn {
    color: #cbd5e1;
    padding: 10px 14px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.68);
}

.filter-btn.is-active,
.filter-btn:hover {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.44);
    background: rgba(245, 158, 11, 0.16);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #fbbf24;
}

.detail-hero {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 28px;
    align-items: end;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.62)),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 42%);
    box-shadow: var(--shadow);
}

.detail-hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.detail-hero p {
    color: #dbe4ef;
    font-size: 1.05rem;
    line-height: 1.82;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 24px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-facts span {
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.13);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.player-video {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-start {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.18));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-start span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 20px 58px rgba(245, 158, 11, 0.44);
}

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

.content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    align-items: start;
    margin-top: 32px;
}

.article-panel,
.side-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.64);
    padding: 24px;
}

.article-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
}

.article-panel p {
    color: #dbe4ef;
    line-height: 1.95;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.side-panel .mini-card {
    grid-template-columns: 100px 1fr;
    margin-bottom: 12px;
}

.empty-state {
    display: none;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.62);
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
    padding: 44px 0;
}

.site-footer p,
.site-footer a {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 12px;
}

.site-footer a {
    display: block;
}

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

@media (max-width: 980px) {
    .grid.cards,
    .grid.cards-wide,
    .grid.categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid,
    .detail-hero,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .main-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 84px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

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

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

    .local-tools {
        grid-template-columns: 1fr;
    }
}

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

    .hero {
        min-height: 580px;
        height: 76vh;
    }

    .hero-content {
        padding-bottom: 72px;
    }

    .grid.cards,
    .grid.cards-wide,
    .grid.categories,
    .mini-list {
        grid-template-columns: 1fr;
    }

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

    .mini-card {
        grid-template-columns: 118px 1fr;
    }

    .detail-hero {
        padding: 22px;
        border-radius: 24px;
    }

    .article-panel,
    .side-panel {
        padding: 18px;
    }
}
