:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --sky: #38bdf8;
    --sky-strong: #0284c7;
    --accent: #f97316;
    --danger: #f87171;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.46);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.18), transparent 32rem),
        radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--sky), var(--sky-strong));
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.28);
}

.brand-text {
    font-size: 1.18rem;
}

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

.nav-link {
    padding: 10px 14px;
    color: var(--muted-2);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

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

.header-search input,
.mobile-search input,
.big-search input,
.filter-panel input,
.filter-panel select,
.search-filter-panel select {
    width: 100%;
    color: #fff;
    background: rgba(2, 6, 23, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    padding: 8px 12px;
    border: 0;
    background: transparent;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-filter-panel select:focus {
    border-color: rgba(56, 189, 248, 0.72);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.header-search button,
.mobile-search button,
.big-search button,
.filter-panel button,
.primary-button,
.ghost-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.header-search button {
    padding: 8px 14px;
    color: #fff;
    background: var(--sky-strong);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
}

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

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 14px 16px 18px;
    background: rgba(2, 6, 23, 0.94);
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav-link {
    display: block;
    padding: 12px 4px;
    color: var(--muted-2);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

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

.mobile-search input {
    padding: 11px 14px;
}

.mobile-search button {
    padding: 11px 16px;
    color: #fff;
    background: var(--sky-strong);
}

.hero-carousel {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 900ms ease;
}

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

.hero-image,
.detail-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.04);
}

.hero-image.is-missing,
.detail-backdrop.is-missing,
.category-card img.is-missing {
    opacity: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 38%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 76px;
}

.hero-copy {
    width: min(760px, 100%);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--sky);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
}

.hero-copy h1 {
    max-width: 820px;
    font-size: clamp(2.6rem, 7vw, 5.4rem);
}

.hero-description,
.page-hero p,
.detail-one-line {
    color: var(--muted-2);
    line-height: 1.8;
}

.hero-description {
    max-width: 720px;
    margin: 22px 0 0;
    font-size: 1.08rem;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #dbeafe;
    font-size: 0.82rem;
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 800;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, var(--sky), var(--sky-strong));
    box-shadow: 0 14px 40px rgba(14, 165, 233, 0.28);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.filter-panel button:hover {
    transform: translateY(-1px);
}

.small-button {
    min-height: 40px;
    padding: 0 16px;
    font-size: 0.9rem;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 2.2rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.44);
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--sky);
}

.search-band {
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    background: rgba(15, 23, 42, 0.7);
}

.search-band-inner {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    padding: 32px 0;
}

.search-band h2,
.section-header h2,
.text-panel h2,
.side-panel h2,
.category-overview-copy h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: -0.02em;
}

.search-band p,
.category-overview-copy p,
.site-footer p {
    color: var(--muted);
}

.big-search {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.62);
}

.big-search input {
    padding: 13px 16px;
    border: 0;
    background: transparent;
}

.big-search button {
    min-width: 118px;
    padding: 0 20px;
    color: #fff;
    background: var(--sky-strong);
}

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

.soft-section {
    background: rgba(15, 23, 42, 0.34);
    border-block: 1px solid rgba(148, 163, 184, 0.08);
}

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

.section-more {
    color: var(--sky);
    font-weight: 800;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 14px 44px rgba(2, 6, 23, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.38);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.42);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(14, 165, 233, 0.28), rgba(15, 23, 42, 0.92)),
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.16), transparent 30%);
}

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

.movie-card:hover .poster-frame img {
    transform: scale(1.07);
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.86) 100%);
}

.poster-fallback-title {
    position: absolute;
    inset: auto 14px 18px;
    z-index: 2;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 900;
    line-height: 1.25;
    opacity: 0;
}

.poster-frame.image-missing .poster-fallback-title {
    opacity: 1;
}

.poster-badge,
.play-chip {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    color: #fff;
    font-size: 0.75rem;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}

.play-chip {
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    color: #fff;
    background: var(--sky-strong);
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.28);
}

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

.movie-card h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
}

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

.movie-meta,
.movie-desc {
    color: var(--muted);
}

.movie-meta {
    margin: 8px 0 0;
    font-size: 0.82rem;
}

.movie-desc {
    min-height: 44px;
    margin: 10px 0 12px;
    font-size: 0.92rem;
    line-height: 1.55;
}

.compact-card {
    display: grid;
    grid-template-columns: 96px 1fr;
}

.compact-card .poster-frame {
    aspect-ratio: 2 / 3;
}

.compact-card .movie-card-body {
    padding: 12px;
}

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

.compact-card .tag-row span:nth-child(n + 3) {
    display: none;
}

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

.category-card {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.category-card img,
.category-card-overlay {
    position: absolute;
    inset: 0;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: transform 0.35s ease;
}

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

.category-card-overlay {
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.94)),
        linear-gradient(90deg, rgba(14, 165, 233, 0.32), transparent);
}

.category-card strong,
.category-card em,
.category-card span:not(.category-card-overlay) {
    position: relative;
    z-index: 2;
}

.category-card strong {
    font-size: 1.45rem;
}

.category-card em {
    margin: 6px 0 10px;
    color: var(--sky);
    font-style: normal;
    font-weight: 800;
}

.category-card span:not(.category-card-overlay) {
    color: var(--muted-2);
    line-height: 1.6;
}

.two-column-grid {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: 30px;
}

.ranking-panel,
.side-panel,
.text-panel,
.filter-panel,
.ranking-table {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 52px rgba(2, 6, 23, 0.25);
}

.ranking-panel {
    overflow: hidden;
}

.rank-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-item:hover {
    background: rgba(56, 189, 248, 0.08);
}

.rank-number {
    color: var(--sky);
    font-weight: 900;
    font-size: 1.1rem;
}

.rank-title {
    font-weight: 800;
}

.rank-meta {
    color: var(--muted);
    font-size: 0.84rem;
}

.rank-views {
    grid-column: 3;
    color: var(--muted);
    font-size: 0.82rem;
}

.page-hero {
    position: relative;
    padding: 96px 0 76px;
    overflow: hidden;
    background:
        radial-gradient(circle at 22% 20%, rgba(56, 189, 248, 0.2), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
}

.slim-hero {
    padding: 82px 0 62px;
}

.page-hero h1 {
    max-width: 880px;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.page-hero p {
    max-width: 760px;
    margin-top: 18px;
}

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

.breadcrumb a:hover {
    color: var(--sky);
}

.category-overview-list {
    display: grid;
    gap: 28px;
}

.category-overview-block {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: center;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 6px);
    background: rgba(15, 23, 42, 0.62);
}

.category-overview-copy p {
    line-height: 1.7;
}

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

.filter-section {
    position: sticky;
    top: 72px;
    z-index: 30;
    padding: 18px 0;
    background: rgba(2, 6, 23, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px auto auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.82rem;
}

.filter-panel input,
.filter-panel select,
.search-filter-panel select {
    min-height: 42px;
    padding: 0 14px;
}

.filter-panel button {
    min-height: 42px;
    padding: 0 16px;
    color: #fff;
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.24);
}

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

.empty-state {
    padding: 36px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: var(--radius);
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 76px 0;
}

.detail-backdrop,
.detail-backdrop-mask {
    position: absolute;
    inset: 0;
}

.detail-backdrop-mask {
    background:
        linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.82) 46%, rgba(2, 6, 23, 0.48) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.22) 54%, rgba(2, 6, 23, 0.2) 100%);
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 34px;
    align-items: end;
}

.large-poster {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    max-width: 860px;
    margin-top: 8px;
    font-size: clamp(2rem, 5vw, 4.6rem);
}

.detail-one-line {
    max-width: 860px;
    margin: 18px 0 0;
    font-size: 1.08rem;
}

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

.detail-meta-grid span {
    padding: 12px 14px;
    color: var(--muted-2);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.62);
}

.detail-meta-grid strong {
    display: block;
    margin-bottom: 4px;
    color: var(--sky);
    font-size: 0.78rem;
}

.detail-tags {
    margin-bottom: 24px;
}

.detail-main-section {
    padding-top: 36px;
}

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

.detail-main-column,
.detail-side-column {
    display: grid;
    align-content: start;
    gap: 22px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: calc(var(--radius) + 4px);
    background: #000;
    box-shadow: 0 24px 90px rgba(2, 6, 23, 0.48);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 10px;
    color: #fff;
    text-align: center;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.76));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.player-shell.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-overlay-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    font-size: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky), var(--sky-strong));
    box-shadow: 0 16px 40px rgba(14, 165, 233, 0.3);
}

.play-overlay strong {
    font-size: 1.25rem;
}

.play-overlay em,
.player-message {
    color: var(--muted-2);
    font-style: normal;
}

.player-message {
    position: absolute;
    left: 16px;
    bottom: 12px;
    margin: 0;
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.74);
}

.text-panel,
.side-panel {
    padding: 24px;
}

.text-panel p {
    color: var(--muted-2);
    line-height: 1.9;
}

.info-list {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px 12px;
    margin: 18px 0 0;
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    color: var(--muted-2);
}

.info-list a,
.side-related-list a:hover {
    color: var(--sky);
}

.side-related-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.side-related-list a {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    color: var(--muted-2);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.side-related-list em {
    color: var(--muted);
    font-style: normal;
}

.ranking-table {
    overflow: hidden;
}

.ranking-table-head,
.ranking-table-row {
    display: grid;
    grid-template-columns: 72px minmax(180px, 1fr) 110px 90px minmax(160px, 1.1fr) 100px;
    gap: 12px;
    align-items: center;
    padding: 14px 18px;
}

.ranking-table-head {
    color: var(--muted);
    font-size: 0.84rem;
    background: rgba(2, 6, 23, 0.36);
}

.ranking-table-row {
    color: var(--muted-2);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.ranking-table-row:hover {
    color: #fff;
    background: rgba(56, 189, 248, 0.08);
}

.ranking-pos {
    color: var(--sky);
    font-weight: 900;
}

.ranking-title {
    color: #fff;
    font-weight: 800;
}

.search-page-form {
    max-width: 760px;
    margin-top: 26px;
}

.search-filter-panel {
    grid-template-columns: 220px 220px auto auto;
}

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

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

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

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.footer-links a {
    color: var(--muted-2);
}

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

[hidden] {
    display: none !important;
}

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

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

    .detail-content-grid,
    .two-column-grid {
        grid-template-columns: 1fr;
    }

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

    .filter-count {
        grid-column: 1 / -1;
    }
}

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

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

    .hero-carousel {
        height: 560px;
    }

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

    .hero-arrow {
        display: none;
    }

    .search-band-inner,
    .category-overview-block,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-layout {
        align-items: start;
    }

    .detail-poster {
        width: min(220px, 70vw);
    }

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

    .ranking-table {
        overflow-x: auto;
    }

    .ranking-table-head,
    .ranking-table-row {
        min-width: 820px;
    }
}

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

    .header-inner {
        min-height: 64px;
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-copy h1 {
        font-size: clamp(2.2rem, 12vw, 3.6rem);
    }

    .hero-description {
        font-size: 0.98rem;
    }

    .hero-actions,
    .big-search {
        flex-direction: column;
        align-items: stretch;
        border-radius: 22px;
    }

    .big-search button {
        min-height: 44px;
    }

    .content-section {
        padding: 46px 0;
    }

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

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-preview-grid {
        grid-template-columns: 1fr;
    }

    .compact-card {
        grid-template-columns: 92px 1fr;
    }

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

    .detail-hero {
        padding: 48px 0;
    }

    .detail-meta-grid {
        grid-template-columns: 1fr;
    }
}
