:root {
    --primary: #0369a1;
    --primary-soft: #e0f2fe;
    --secondary: #0d9488;
    --secondary-soft: #ccfbf1;
    --accent: #ea580c;
    --accent-soft: #ffedd5;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --panel: #ffffff;
    --bg: #f8fafc;
    --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 22px 45px rgba(15, 23, 42, 0.16);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

body.detail-page {
    background: #f8fafc;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86));
    border-bottom: 1px solid rgba(229, 231, 235, 0.82);
    backdrop-filter: blur(14px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 12px 24px rgba(3, 105, 161, 0.22);
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    color: #374151;
    font-weight: 600;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: #111827;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.mobile-nav.open {
    display: grid;
    gap: 4px;
}

main {
    padding-top: 72px;
}

.hero-slider {
    position: relative;
    height: min(78vh, 760px);
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 0.9s ease;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 76% 22%, rgba(14, 165, 233, 0.24), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.65) 48%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.8), transparent 45%);
}

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

.hero-text {
    width: min(760px, 100%);
    color: #ffffff;
    padding: 42px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #bae6fd;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-text h1,
.inner-hero h1,
.detail-title-block h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-text p,
.inner-hero p,
.detail-title-block p {
    max-width: 760px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

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

.hero-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.card-tags span {
    color: var(--primary);
    background: var(--primary-soft);
    border-color: transparent;
}

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

.btn-primary,
.btn-ghost,
.home-search button,
.search-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 16px 32px rgba(3, 105, 161, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover,
.home-search button:hover,
.search-controls button:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 20px 40px rgba(3, 105, 161, 0.32);
}

.btn-primary.full {
    width: 100%;
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(8px);
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.52);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 34px;
    background: #ffffff;
}

.home-search-band {
    margin-top: -42px;
    position: relative;
    z-index: 10;
}

.home-search-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(229, 231, 235, 0.82);
    backdrop-filter: blur(16px);
}

.home-search-inner h2 {
    margin: 0 0 6px;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.home-search-inner p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.home-search,
.search-controls {
    display: flex;
    gap: 10px;
}

.home-search input,
.filter-panel input,
.filter-panel select,
.search-controls input,
.search-controls select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-controls input:focus,
.search-controls select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(3, 105, 161, 0.12);
}

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

.soft-panel-section {
    padding: 28px 0;
}

.soft-panel {
    padding: 36px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
}

.soft-panel-section.alt .soft-panel {
    background: linear-gradient(135deg, var(--secondary-soft), var(--primary-soft), var(--accent-soft));
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
}

.section-heading.compact {
    margin-bottom: 18px;
}

.heading-line {
    flex: 0 0 auto;
    width: 5px;
    height: 38px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.heading-line.accent {
    background: linear-gradient(180deg, var(--accent), var(--primary));
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

.section-icon {
    color: var(--accent);
}

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

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

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(3, 105, 161, 0.22);
    box-shadow: var(--shadow-lg);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #082f49, #0f766e);
}

.movie-card-compact .movie-cover,
.horizontal-cover {
    aspect-ratio: 16 / 9;
}

.movie-card-wide .movie-cover {
    aspect-ratio: 16 / 9;
}

.movie-cover img,
.horizontal-cover img,
.category-preview img,
.poster-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.movie-cover::after,
.horizontal-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.66));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .movie-cover::after,
.horizontal-card:hover .horizontal-cover::after {
    opacity: 1;
}

.movie-quality {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
}

.movie-play,
.horizontal-cover span {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-info,
.horizontal-body {
    padding: 16px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.movie-meta-line span {
    display: inline-flex;
    align-items: center;
}

.movie-meta-line span:not(:last-child)::after {
    content: "·";
    margin-left: 6px;
    color: #cbd5e1;
}

.movie-card h3,
.horizontal-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.movie-card h3 a:hover,
.horizontal-card h3 a:hover,
.text-link:hover {
    color: var(--primary);
}

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

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

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

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.rating {
    color: #ca8a04;
    font-weight: 900;
}

.card-bottom a,
.text-link {
    color: var(--primary);
    font-weight: 800;
}

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

.horizontal-card {
    display: flex;
    align-items: stretch;
    gap: 0;
    position: relative;
}

.horizontal-cover {
    position: relative;
    flex: 0 0 200px;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.rank-number {
    flex: 0 0 62px;
    display: grid;
    place-items: center;
    color: var(--primary);
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(180deg, var(--primary-soft), #ffffff);
    border-right: 1px solid var(--line);
}

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

.category-tile {
    min-height: 164px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-tile span {
    color: var(--secondary);
    font-weight: 900;
}

.category-tile strong {
    font-size: 20px;
    font-weight: 900;
}

.category-tile em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    line-height: 1.6;
}

.inner-hero {
    padding: 74px 0 70px;
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 22%, rgba(20, 184, 166, 0.28), transparent 34%),
        linear-gradient(135deg, var(--primary), var(--secondary) 58%, var(--accent));
}

.inner-hero p {
    color: rgba(255, 255, 255, 0.84);
}

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

.category-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    height: 160px;
    overflow: hidden;
    background: #0f172a;
}

.category-card-body {
    padding: 22px;
}

.category-card-body span {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

.category-card-body h2 {
    margin: 8px 0 10px;
    font-size: 24px;
    font-weight: 900;
}

.category-card-body p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.7;
}

.filter-panel,
.search-controls {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.filter-panel label,
.search-controls label {
    display: grid;
    gap: 8px;
    color: #374151;
    font-size: 13px;
    font-weight: 900;
}

.empty-state,
.search-summary {
    padding: 28px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.search-panel {
    display: grid;
    gap: 24px;
}

.search-controls {
    grid-template-columns: 1.6fr 1fr 0.8fr auto;
}

.search-controls button {
    align-self: end;
    min-width: 126px;
}

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

.detail-hero {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: flex-end;
    color: #ffffff;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.56) 58%, rgba(2, 6, 23, 0.44) 100%),
        radial-gradient(circle at 80% 15%, rgba(14, 165, 233, 0.26), transparent 34%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 42px 0;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: #ffffff;
}

.detail-title-block {
    max-width: 840px;
}

.detail-section {
    padding-top: 42px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.player-card,
.content-card,
.side-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.content-card,
.side-card {
    padding: 24px;
}

.video-player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

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

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: var(--primary);
    font-size: 32px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.player-button:hover {
    transform: translate(-50%, -50%) scale(1.06);
}

.video-player.playing .player-button {
    opacity: 0;
    pointer-events: none;
}

.player-status {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 4;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
}

.player-status.ready {
    display: none;
}

.prose-text {
    display: grid;
    gap: 14px;
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
}

.prose-text p {
    margin: 0;
}

.detail-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
}

.poster-side {
    display: grid;
    gap: 16px;
}

.poster-side img {
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    background: #0f172a;
}

.side-card h2 {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 900;
}

.side-card p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.7;
}

.movie-dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.movie-dl div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.movie-dl div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.movie-dl dt {
    color: var(--muted);
    font-weight: 800;
}

.movie-dl dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
}

.site-footer {
    margin-top: 42px;
    padding: 46px 0;
    color: #4b5563;
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.6fr 1fr;
    gap: 34px;
}

.footer-logo {
    margin-bottom: 12px;
}

.site-footer p {
    max-width: 420px;
    margin: 0;
    line-height: 1.7;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 900;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

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

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

    .detail-side {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .nav-toggle {
        display: flex;
    }

    .hero-slider {
        min-height: 520px;
        height: 68vh;
    }

    .hero-arrow {
        display: none;
    }

    .home-search-inner,
    .footer-grid,
    .category-list-grid,
    .horizontal-grid {
        grid-template-columns: 1fr;
    }

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

    .search-controls button {
        width: 100%;
    }

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

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

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

    .header-inner {
        height: 64px;
    }

    main {
        padding-top: 64px;
    }

    .hero-slider {
        min-height: 560px;
    }

    .home-search-band {
        margin-top: 0;
    }

    .home-search-inner,
    .soft-panel,
    .content-card,
    .side-card {
        padding: 18px;
        border-radius: 18px;
    }

    .home-search {
        display: grid;
    }

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

    .poster-grid,
    .compact-grid,
    .wide-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-card {
        display: grid;
    }

    .horizontal-cover {
        flex-basis: auto;
    }

    .rank-number {
        position: absolute;
        z-index: 5;
        left: 10px;
        top: 10px;
        width: 48px;
        height: 48px;
        border: 0;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.92);
    }

    .footer-links.two-col {
        grid-template-columns: 1fr;
    }
}
