:root {
    --bg: #f9fafb;
    --surface: #ffffff;
    --surface-soft: #f3f7ff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --cyan: #0f766e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --footer: #111827;
    --radius: 16px;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-icon,
.footer-brand span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
    font-size: 14px;
}

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--primary);
    background: #eff6ff;
}

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

.header-search input,
.mobile-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 999px;
    outline: none;
    transition: 0.2s ease;
}

.header-search input {
    width: 220px;
    padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.big-search button {
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: var(--primary);
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    margin-left: auto;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #111827;
    border-radius: 4px;
}

.mobile-menu {
    padding: 12px 16px 18px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-link {
    display: block;
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.mobile-search input {
    min-width: 0;
    flex: 1;
    padding: 10px 14px;
}

.hero {
    position: relative;
    min-height: 500px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.45), transparent 34%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.38));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 340px;
    align-items: center;
    gap: 42px;
    color: #ffffff;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #bfdbfe;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    max-width: 860px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero h2 {
    margin: 24px 0 10px;
    font-size: clamp(24px, 3vw, 38px);
}

.hero-lead,
.hero-summary,
.page-hero p {
    max-width: 760px;
    color: #e5e7eb;
    font-size: clamp(16px, 2vw, 20px);
}

.hero-summary {
    color: #d1d5db;
}

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

.hero-actions.centered {
    justify-content: center;
}

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

.btn.primary {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn.glass {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.btn.glass.dark {
    color: #111827;
    border-color: rgba(17, 24, 39, 0.12);
    background: rgba(255, 255, 255, 0.78);
}

.btn.full {
    width: 100%;
}

.hero-panel {
    padding: 28px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.hero-panel strong {
    display: block;
    font-size: 24px;
    margin-bottom: 12px;
}

.hero-panel span,
.hero-panel p {
    color: #e5e7eb;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dot.active {
    width: 36px;
    background: #ffffff;
}

.page-section {
    padding: 56px 0;
}

.section-block {
    margin-bottom: 64px;
}

.section-block.tinted,
.hot-zone {
    padding: 32px;
    border-radius: 28px;
}

.section-block.tinted {
    background: linear-gradient(90deg, #eff6ff, #ecfeff);
}

.hot-zone {
    background: linear-gradient(90deg, #fff7ed, #fef2f2);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.15;
}

.section-heading a {
    color: var(--primary);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

.movie-list.two-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.movie-card {
    overflow: hidden;
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.movie-thumb {
    position: relative;
    display: block;
    height: 220px;
    overflow: hidden;
    background: #111827;
}

.movie-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-thumb img {
    transform: scale(1.06);
}

.movie-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: rgba(0, 0, 0, 0.32);
    transition: opacity 0.25s ease;
}

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

.play-mark {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.88);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: 0.25s ease;
}

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

.category-pill,
.duration,
.rank-badge {
    position: absolute;
    z-index: 3;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.category-pill {
    left: 12px;
    top: 12px;
    background: var(--primary);
}

.duration {
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
    left: 12px;
    bottom: 12px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-info {
    padding: 16px;
}

.movie-title {
    display: -webkit-box;
    min-height: 2.8em;
    overflow: hidden;
    color: #111827;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--primary);
}

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

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #6b7280;
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags a,
.cloud-tags a,
.footer-tags span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 190px 1fr;
}

.horizontal-thumb {
    height: 100%;
    min-height: 150px;
}

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

.category-card {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 24px;
    color: #ffffff;
    box-shadow: var(--shadow-soft);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-card:hover img {
    transform: scale(1.06);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.86));
}

.category-card strong,
.category-card em,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card strong {
    font-size: 26px;
    line-height: 1.2;
}

.category-card em {
    font-style: normal;
    color: #bfdbfe;
    font-weight: 800;
}

.category-card p {
    margin: 8px 0 0;
    color: #e5e7eb;
}

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

.stat-card,
.detail-card,
.sidebar-card,
.poster-card,
.filter-panel,
.search-page-panel,
.ranking-sidebar {
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.stat-card {
    padding: 28px;
}

.cloud-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cloud-tags a span,
.footer-list a span {
    opacity: 0.72;
}

.page-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.44), transparent 28%),
        linear-gradient(135deg, #0f172a, #1d4ed8 55%, #0f766e);
}

.compact-hero {
    padding: 72px 0;
}

.page-hero h1 {
    margin-bottom: 14px;
}

.breadcrumb {
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary);
    font-weight: 800;
}

.breadcrumb.dark {
    color: #cbd5e1;
}

.breadcrumb.dark a {
    color: #93c5fd;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.1fr 2fr auto;
    align-items: end;
    gap: 18px;
    padding: 22px;
    margin-bottom: 28px;
}

.filter-search label,
.filter-selects label {
    display: grid;
    gap: 8px;
    color: #374151;
    font-weight: 800;
}

.filter-search input,
.filter-selects select {
    width: 100%;
    padding: 11px 14px;
}

.filter-selects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.filter-count {
    margin: 0;
    color: var(--muted);
    white-space: nowrap;
}

.filter-count span {
    color: var(--primary);
    font-weight: 900;
}

.cta-block {
    padding: 54px 24px;
    border-radius: 28px;
    color: #ffffff;
    text-align: center;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.cta-block h2 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 44px);
}

.cta-block p {
    max-width: 760px;
    margin: 0 auto;
    color: #d1d5db;
}

.player-stage {
    padding: 24px 0 34px;
    background: #020617;
}

.player-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    color: #ffffff;
}

.player-topbar > a {
    color: #ffffff;
    font-weight: 800;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.44);
}

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

.video-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: none;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
}

.video-start span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.9);
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.35);
    font-size: 26px;
}

.video-start strong {
    font-size: 18px;
}

.video-start.hidden {
    display: none;
}

.video-status {
    position: absolute;
    left: 18px;
    bottom: 14px;
    z-index: 4;
    margin: 0;
    color: #ffffff;
    font-size: 13px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
}

.detail-card {
    padding: 28px;
    margin-bottom: 24px;
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
}

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

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
}

.detail-lead {
    margin: 0 0 18px;
    color: #374151;
    font-size: 18px;
}

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

.prose-card h2,
.sidebar-card h2,
.stat-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.prose-card p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-list dt {
    color: #6b7280;
    font-weight: 800;
}

.info-list dd {
    margin: 0;
}

.info-list a {
    color: var(--primary);
    font-weight: 800;
}

.detail-sidebar {
    display: grid;
    align-content: start;
    gap: 24px;
}

.poster-card,
.sidebar-card,
.ranking-sidebar {
    padding: 18px;
}

.poster-card img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 16px;
}

.mini-card {
    display: grid;
    grid-template-columns: auto 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.mini-card:last-child {
    border-bottom: 0;
}

.mini-card img {
    width: 58px;
    height: 74px;
    object-fit: cover;
    border-radius: 10px;
}

.mini-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: #111827;
    font-size: 14px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mini-card em {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
    font-style: normal;
}

.mini-rank {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.related-block {
    margin-top: 36px;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
}

.ranking-sidebar {
    position: sticky;
    top: 96px;
    align-self: start;
}

.search-page-panel {
    padding: 28px;
    margin-bottom: 32px;
}

.big-search {
    display: flex;
    gap: 12px;
}

.big-search input {
    min-width: 0;
    flex: 1;
    padding: 14px 18px;
}

.big-search button {
    padding: 0 26px;
}

.search-note {
    margin: 12px 0 0;
    color: var(--muted);
}

.search-results-wrap {
    margin-bottom: 48px;
}

.site-footer {
    margin-top: 32px;
    color: #d1d5db;
    background: var(--footer);
}

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

.footer-brand {
    color: #ffffff;
}

.site-footer p {
    color: #9ca3af;
}

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

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-list li + li {
    margin-top: 8px;
}

.footer-list a {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #d1d5db;
}

.footer-list a:hover {
    color: #60a5fa;
}

.footer-bottom {
    padding: 18px;
    border-top: 1px solid #1f2937;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

.is-hidden {
    display: none !important;
}

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

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

    .hero-panel,
    .ranking-sidebar {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

    .hero {
        min-height: 660px;
    }

    .hero-content {
        gap: 24px;
        padding: 72px 0;
    }

    .movie-grid.three-cols,
    .movie-grid.four-cols,
    .movie-list.two-cols,
    .category-grid,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .filter-selects {
        grid-template-columns: 1fr;
    }

    .player-topbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

    .brand-text {
        font-size: 18px;
    }

    .hero,
    .hero-slide {
        min-height: 720px;
    }

    .hero-panel {
        padding: 20px;
    }

    .section-block.tinted,
    .hot-zone {
        padding: 18px;
        border-radius: 20px;
    }

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

    .movie-grid.three-cols,
    .movie-grid.four-cols,
    .movie-list.two-cols,
    .category-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal {
        grid-template-columns: 1fr;
    }

    .horizontal-thumb {
        height: 220px;
    }

    .compact-hero {
        padding: 52px 0;
    }

    .detail-card {
        padding: 20px;
    }

    .poster-card img {
        height: 360px;
    }

    .big-search {
        flex-direction: column;
    }
}
