:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(30, 41, 59, 0.62);
    --panel-deep: rgba(15, 23, 42, 0.78);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-deep: #d97706;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #020617 0%, #0f172a 46%, #111827 100%);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.84);
    backdrop-filter: blur(18px);
}

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.35);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-right: auto;
}

.nav-link,
.mobile-link {
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #ffffff;
}

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

.search-input,
.catalog-filter {
    width: 250px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.92);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-input:focus,
.catalog-filter:focus {
    border-color: rgba(245, 158, 11, 0.76);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.search-button,
.primary-button,
.ghost-button,
.card-action {
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.search-button,
.primary-button,
.card-action {
    color: #111827;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.search-button {
    min-height: 40px;
    padding: 0 16px;
}

.search-button:hover,
.primary-button:hover,
.card-action:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.92);
    padding: 9px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 2px;
}

.mobile-panel {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
}

.mobile-inner {
    padding: 18px 0;
}

.mobile-nav {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #020617;
}

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

.hero-slide {
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

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

.hero-slide img,
.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.28), transparent 34%), linear-gradient(135deg, #111827, #020617);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.55) 46%, rgba(0, 0, 0, 0.08) 100%), linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.88));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: #111827;
    background: var(--accent);
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.sub-hero h1,
.detail-copy h1 {
    margin: 18px 0 16px;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p,
.sub-hero p,
.detail-copy p {
    margin: 0;
    color: #d1d5db;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.hero-meta,
.detail-meta,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
    color: #e5e7eb;
}

.hero-meta span,
.detail-meta span,
.card-tags span,
.tag-cloud span,
.genre-tags span,
.meta-row span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(15, 23, 42, 0.62);
    color: #d1d5db;
    font-size: 13px;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.48);
}

.ghost-button:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 158, 11, 0.58);
    color: #fbbf24;
    background: rgba(15, 23, 42, 0.76);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.3s ease, background 0.3s ease;
}

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

.quick-categories {
    padding: 28px 0 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.category-tile,
.panel-block,
.latest-panel,
.score-panel,
.article-panel,
.info-panel,
.text-page article {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.category-tile {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    border-radius: 20px;
    padding: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.58);
    background: rgba(30, 41, 59, 0.82);
}

.category-tile strong {
    color: #ffffff;
    font-size: 18px;
}

.category-tile span,
.footer-text {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

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

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

.section-head h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.02em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.section-link {
    color: #fbbf24;
    font-weight: 800;
}

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

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

.all-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.52);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(245, 158, 11, 0.48);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.poster-link,
.poster-wrap {
    display: block;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.28), transparent 34%), linear-gradient(135deg, #1e293b, #020617);
}

.poster-wrap img,
.wide-cover img,
.detail-poster 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.06);
}

.poster-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.card-tags span {
    padding: 4px 8px;
    font-size: 12px;
}

.movie-card h3,
.wide-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
}

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

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

.card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    font-size: 14px;
}

.panel-block,
.latest-panel,
.score-panel {
    border-radius: 28px;
    padding: 30px;
}

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 284px;
    gap: 22px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 4px 4px 18px;
    scrollbar-width: thin;
}

.rail-item {
    min-width: 0;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
    gap: 28px;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
    border: 1px solid transparent;
    border-radius: 18px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.56);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.wide-card:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(15, 23, 42, 0.88);
}

.wide-cover {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.wide-body {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.rank-number {
    min-width: 42px;
    color: #f59e0b;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.mini-grid {
    display: grid;
    gap: 16px;
}

.compact-card .poster-wrap {
    aspect-ratio: 16 / 9;
}

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

.compact-card p {
    -webkit-line-clamp: 1;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: -6px 0 22px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.64);
}

.catalog-filter {
    width: min(420px, 100%);
}

.filter-status {
    color: var(--muted);
    font-size: 14px;
}

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

.sub-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.24), transparent 32%), linear-gradient(135deg, #020617, #111827 52%, #1e293b);
}

.sub-hero-inner {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 800px;
    padding: 48px 0;
}

.ranking-hero {
    background: radial-gradient(circle at 70% 15%, rgba(245, 158, 11, 0.28), transparent 34%), linear-gradient(135deg, #020617, #111827 55%, #3b1d06);
}

.side-links {
    display: grid;
    gap: 12px;
}

.side-links a {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.56);
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.side-links a:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.42);
    color: #fbbf24;
}

.detail-hero {
    min-height: 580px;
}

.detail-bg {
    opacity: 0.34;
    filter: blur(2px);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.94));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 46px;
    align-items: center;
    min-height: 580px;
    padding: 54px 0;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: linear-gradient(135deg, #1e293b, #020617);
    box-shadow: var(--shadow);
}

.detail-copy {
    max-width: 780px;
}

.tag-cloud,
.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.player-section {
    padding-top: 52px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at 50% 45%, rgba(245, 158, 11, 0.26), rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.88));
    cursor: pointer;
    text-align: center;
}

.play-orb {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    font-size: 34px;
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.32);
}

.play-layer strong {
    width: min(620px, calc(100% - 40px));
    font-size: clamp(20px, 3vw, 34px);
    line-height: 1.3;
}

.player-box.is-playing .play-layer {
    opacity: 0;
    pointer-events: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
    gap: 28px;
}

.article-panel,
.info-panel {
    border-radius: 28px;
    padding: 30px;
}

.article-panel h2,
.info-panel h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 26px;
}

.article-panel p {
    margin: 0 0 26px;
    color: #d1d5db;
    font-size: 16px;
    line-height: 1.9;
}

.info-panel dl {
    margin: 0;
    display: grid;
    gap: 14px;
}

.info-panel dt {
    color: #fbbf24;
    font-weight: 800;
}

.info-panel dd {
    margin: 4px 0 0;
    color: #d1d5db;
    line-height: 1.6;
}

.text-page {
    padding-bottom: 72px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 44px;
    padding: 48px 0;
}

.footer-brand {
    margin-bottom: 16px;
}

.footer-title {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer a:not(.brand) {
    display: block;
    margin: 9px 0;
    color: var(--muted);
    transition: color 0.2s ease;
}

.site-footer a:not(.brand):hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px 16px;
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .all-grid,
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .split-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .desktop-nav,
    .nav-shell > .search-form {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero {
        height: 560px;
    }

    .category-grid,
    .all-grid,
    .movie-grid,
    .featured-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

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

    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-filter {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .shell {
        width: min(100% - 22px, 1180px);
    }

    .brand {
        font-size: 18px;
    }

    .hero {
        height: 520px;
    }

    .hero h1,
    .sub-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }

    .hero p,
    .sub-hero p,
    .detail-copy p {
        font-size: 16px;
    }

    .category-grid,
    .all-grid,
    .movie-grid,
    .featured-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .wide-card {
        grid-template-columns: 118px minmax(0, 1fr);
        gap: 12px;
    }

    .wide-body {
        gap: 10px;
    }

    .rank-number {
        min-width: 32px;
        font-size: 22px;
    }

    .section-block {
        padding-top: 48px;
    }

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

    .panel-block,
    .latest-panel,
    .score-panel,
    .article-panel,
    .info-panel {
        padding: 22px;
        border-radius: 22px;
    }
}
