:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --bg-card-strong: #111827;
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(59, 130, 246, 0.35);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --blue: #3b82f6;
    --blue-soft: #60a5fa;
    --cyan: #22d3ee;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 34rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.nav-wrap {
    width: min(1240px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand {
    font-size: 22px;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.32);
    color: white;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.main-nav a,
.mobile-panel a {
    color: var(--muted-strong);
    font-weight: 600;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-panel a:hover {
    color: white;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(320px, 30vw);
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
}

.nav-search input,
.home-search-block input,
.search-form-large input,
.filter-bar input,
.search-filters select {
    width: 100%;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
}

.nav-search input {
    padding: 8px 12px;
}

.nav-search button,
.home-search-block button,
.search-form-large button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: white;
    background: var(--blue);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    cursor: pointer;
}

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

.mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid var(--border);
}

.mobile-panel.is-open {
    display: grid;
    gap: 14px;
}

.mobile-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mobile-cats a {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
}

.hero-carousel {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    min-height: 620px;
    margin: 32px auto 48px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 34px;
    box-shadow: var(--shadow);
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    opacity: 0.28;
    filter: blur(4px) saturate(1.1);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.4) 100%),
        radial-gradient(circle at 78% 22%, rgba(59, 130, 246, 0.26), transparent 24rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 380px);
    gap: 48px;
    align-items: center;
    padding: clamp(32px, 6vw, 72px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--blue-soft);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1 {
    margin: 0;
    max-width: 860px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p {
    max-width: 720px;
    margin: 24px 0 0;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.8;
}

.hero-tags,
.detail-tags,
.movie-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.movie-card-tags span {
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.12);
}

.hero-tags span,
.detail-tags span {
    padding: 8px 12px;
}

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

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

.primary-btn,
.ghost-btn,
.category-block-head a,
.section-title-row a,
.filter-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
}

.primary-btn,
.category-block-head a,
.section-title-row a {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
    box-shadow: 0 16px 34px rgba(59, 130, 246, 0.28);
}

.ghost-btn,
.filter-bar a {
    border: 1px solid var(--border);
    color: white;
    background: rgba(15, 23, 42, 0.74);
}

.hero-poster {
    position: relative;
    min-height: 480px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 20%, rgba(59, 130, 246, 0.3), transparent 18rem),
        #0f172a;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 480px;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    z-index: 6;
    left: clamp(32px, 6vw, 72px);
    bottom: 28px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 36px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.35);
    cursor: pointer;
}

.hero-dot.is-active {
    background: white;
}

.home-search-block,
.section-wrap,
.inner-page,
.site-footer .footer-grid,
.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.home-search-block {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
    gap: 24px;
    align-items: center;
    margin-bottom: 48px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.home-search-block h2,
.section-title-row h2,
.ranking-panel h2,
.category-block-head h2,
.article-section h2,
.detail-copy h1 {
    margin: 0;
    letter-spacing: -0.04em;
}

.home-search-block p,
.category-block-head p,
.article-section p,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.home-search-block form,
.search-form-large {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.74);
}

.home-search-block input,
.search-form-large input {
    padding: 14px 18px;
}

.home-search-block button,
.search-form-large button {
    padding-left: 22px;
    padding-right: 22px;
}

.section-wrap {
    margin-top: 54px;
}

.section-muted {
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.48);
}

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

.section-title-row h2,
.ranking-panel h2,
.category-block-head h2,
.article-section h2 {
    font-size: clamp(26px, 4vw, 40px);
}

.section-title-row.compact h2 {
    font-size: 30px;
}

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

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

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-card);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.poster-shell {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 18%, rgba(59, 130, 246, 0.35), transparent 12rem),
        linear-gradient(135deg, #0f172a, #111827);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.85) 100%);
}

.poster-play {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    font-size: 12px;
    font-weight: 800;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card-link:hover .poster-play {
    opacity: 1;
    transform: translateY(0);
}

.card-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #fde68a;
    font-size: 11px;
    font-weight: 900;
}

.movie-card-body {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.movie-card-title {
    overflow: hidden;
    color: white;
    font-size: 16px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.movie-card-meta,
.movie-card-desc {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.movie-card-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.category-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.92)),
        var(--cat-image),
        #0f172a;
    background-size: cover;
    background-position: center;
}

.category-card span {
    display: block;
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    position: relative;
    z-index: 1;
    max-width: 22rem;
    color: var(--muted-strong);
    line-height: 1.7;
}

.two-column-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

.ranking-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
}

.rank-list {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.rank-line {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.44);
}

.rank-line:hover {
    background: rgba(59, 130, 246, 0.16);
}

.rank-line span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    background: rgba(59, 130, 246, 0.78);
    font-weight: 900;
}

.rank-line strong,
.rank-line em {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-line em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.inner-page {
    padding-top: 36px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 36px;
    padding: clamp(34px, 6vw, 72px);
    border: 1px solid var(--border);
    border-radius: 30px;
    background:
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.26), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.72));
}

.slim-hero h1,
.ranking-hero h1 {
    font-size: clamp(36px, 5vw, 64px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--muted);
}

.breadcrumb a:hover {
    color: white;
}

.filter-bar,
.search-console {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.74);
}

.filter-bar input {
    padding: 12px 14px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 38px 0 0;
}

.pagination a,
.pagination 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: 999px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.74);
}

.pagination a.current,
.pagination a:hover {
    border-color: var(--border-strong);
    color: white;
    background: rgba(59, 130, 246, 0.22);
}

.category-page-list {
    display: grid;
    gap: 26px;
}

.category-block {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.62);
}

.category-block-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 22px;
}

.ranking-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 36px;
}

.ranking-columns .ranking-panel {
    position: static;
}

.search-page .search-console {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.search-filters {
    display: flex;
    gap: 10px;
}

.search-filters select {
    min-width: 130px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
}

.player-section {
    margin-bottom: 30px;
}

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

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

.play-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.76));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-card.is-playing .play-button {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 88px;
    height: 88px;
    display: block;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 40px rgba(59, 130, 246, 0.36);
}

.play-icon::before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin: 27px 0 0 34px;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 25px solid white;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
    margin-bottom: 34px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
}

.detail-copy {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.64);
}

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

.detail-one-line {
    margin: 18px 0 22px;
    color: var(--muted-strong);
    font-size: 20px;
    line-height: 1.7;
}

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

.detail-meta div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.42);
}

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

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

.article-section {
    margin-bottom: 26px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.58);
}

.article-section p {
    margin: 14px 0 0;
    color: var(--muted-strong);
    font-size: 17px;
    white-space: pre-line;
}

.related-wrap {
    width: 100%;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-grid h3 {
    margin: 0 0 14px;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin-top: 9px;
    color: var(--muted);
}

.footer-grid a:hover {
    color: white;
}

.footer-bottom {
    padding: 18px 0 30px;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.image-off::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 18%, rgba(59, 130, 246, 0.35), transparent 12rem),
        linear-gradient(135deg, #0f172a, #111827);
}

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

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

    .two-column-layout {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    .main-nav,
    .nav-search {
        display: none;
    }

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

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

    .hero-content,
    .home-search-block,
    .detail-layout,
    .footer-grid,
    .search-page .search-console,
    .ranking-columns {
        grid-template-columns: 1fr;
    }

    .hero-content {
        gap: 28px;
    }

    .hero-poster,
    .hero-poster img {
        min-height: 320px;
    }

    .hero-controls {
        left: 32px;
    }

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

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

    .section-title-row,
    .category-block-head,
    .filter-bar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .nav-wrap,
    .mobile-panel,
    .hero-carousel,
    .home-search-block,
    .section-wrap,
    .inner-page,
    .site-footer .footer-grid,
    .footer-bottom {
        width: min(100% - 20px, 1240px);
    }

    .brand {
        font-size: 18px;
    }

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

    .hero-content,
    .page-hero,
    .detail-copy,
    .article-section,
    .section-muted,
    .category-block {
        padding: 20px;
    }

    .hero-copy h1,
    .hero-copy h2,
    .page-hero h1 {
        font-size: 38px;
    }

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

    .category-grid,
    .detail-meta,
    .search-filters {
        grid-template-columns: 1fr;
        flex-direction: column;
        width: 100%;
    }

    .home-search-block form,
    .search-form-large {
        border-radius: 18px;
        flex-direction: column;
    }

    .player-card {
        border-radius: 18px;
    }
}
