:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.72);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --orange: #f97316;
    --radius: 20px;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.08), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong,
.footer-brand {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(90deg, #fde68a, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--muted-strong);
    transition: 0.25s ease;
}

.nav-link {
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.13);
    border-color: rgba(245, 158, 11, 0.18);
}

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: transparent;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    display: grid;
    width: 190px;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--muted-strong);
}

.dropdown-menu a:hover {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
}

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select,
.home-search-card input {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
    outline: none;
    transition: 0.25s ease;
}

.header-search input {
    width: 240px;
    padding: 11px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.home-search-card input:focus {
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.header-search button,
.mobile-search button,
.home-search-card button,
.filter-panel button,
.primary-btn,
.ghost-btn,
.text-link,
.movie-foot a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    font-weight: 700;
    transition: 0.25s ease;
}

.header-search button,
.mobile-search button,
.home-search-card button,
.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--orange));
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.26);
}

.header-search button,
.mobile-search button {
    min-height: 44px;
    padding: 0 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.home-search-card button:hover,
.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(245, 158, 11, 0.38);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--muted-strong);
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.mobile-search {
    margin: 16px auto;
    max-width: 540px;
}

.mobile-search input {
    flex: 1;
    padding: 12px 14px;
}

.mobile-panel nav {
    display: grid;
    max-width: 540px;
    margin: 0 auto;
    gap: 8px;
}

.mobile-link {
    justify-content: flex-start;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.85s ease, visibility 0.85s ease;
}

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 34%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.5) 48%, rgba(2, 6, 23, 0.15));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    padding-top: 58px;
}

.hero-label,
.page-hero span,
.section-heading span,
.home-search-card span,
.rank-panel > span,
.category-card span {
    display: inline-flex;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 14px 0 18px;
    font-size: clamp(40px, 6vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.lead-text {
    max-width: 720px;
    color: var(--muted-strong);
    font-size: clamp(17px, 2vw, 21px);
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0;
}

.hero-meta span,
.detail-meta span {
    padding: 8px 13px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.64);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.primary-btn,
.ghost-btn {
    min-height: 52px;
    padding: 0 24px;
}

.ghost-btn {
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.64);
}

.ghost-btn:hover {
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(245, 158, 11, 0.1);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.44);
    transition: 0.25s ease;
}

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

.home-search-card {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
    align-items: center;
    margin-top: -54px;
    padding: 28px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.82));
    box-shadow: var(--shadow);
    position: relative;
    z-index: 6;
}

.home-search-card h2 {
    margin: 8px 0 0;
    font-size: clamp(24px, 3vw, 36px);
}

.home-search-card form {
    display: flex;
    gap: 12px;
}

.home-search-card input {
    flex: 1;
    padding: 15px 16px;
}

.home-search-card button {
    padding: 0 22px;
}

.home-block,
.listing-section,
.category-overview,
.prose-section,
.player-section,
.detail-content {
    padding: 72px 0;
}

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

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
}

.section-heading p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.78));
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.24);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.36);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.88);
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 44%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), transparent);
}

.movie-body {
    padding: 18px;
}

.movie-meta,
.movie-foot,
.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.movie-meta {
    margin-bottom: 10px;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 800;
}

.movie-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.3;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row span,
.detail-tags a,
.genre-card span {
    padding: 5px 9px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.62);
    font-size: 12px;
}

.movie-foot {
    justify-content: space-between;
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
}

.movie-foot a {
    min-height: 34px;
    padding: 0 12px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
}

.movie-foot a:hover {
    color: #fff;
    background: var(--accent);
}

.wide-band {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(30, 41, 59, 0.36), rgba(15, 23, 42, 0.2));
}

.rail-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 290px);
    gap: 18px;
    overflow-x: auto;
    padding: 0 0 16px;
    scroll-snap-type: x proximity;
}

.rail-card {
    scroll-snap-align: start;
}

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

.category-tile,
.category-card,
.info-card,
.story-card,
.rank-panel,
.filter-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
}

.category-tile {
    display: block;
    padding: 18px;
    transition: 0.25s ease;
}

.category-tile:hover,
.category-card:hover,
.info-card:hover,
.story-card:hover {
    border-color: rgba(245, 158, 11, 0.38);
    transform: translateY(-4px);
}

.category-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.category-stack img,
.category-visual img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.category-tile strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

.category-tile span,
.category-card p,
.info-card p,
.story-card p,
.rank-panel small {
    color: var(--muted);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
    gap: 26px;
}

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

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

.horizontal-card .poster-wrap {
    aspect-ratio: 2 / 3;
    height: 100%;
}

.rank-panel {
    position: sticky;
    top: 102px;
    padding: 24px;
    align-self: start;
    background: linear-gradient(145deg, rgba(120, 53, 15, 0.28), rgba(15, 23, 42, 0.8));
}

.rank-panel h2 {
    margin: 8px 0 20px;
    font-size: 28px;
}

.rank-list {
    display: grid;
    gap: 12px;
}

.rank-list a {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    padding: 11px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.58);
}

.rank-list a:hover {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
}

.rank-list em,
.rank-badge {
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-style: normal;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--orange));
}

.rank-list em {
    width: 34px;
    height: 34px;
}

.rank-list strong,
.rank-list small {
    display: block;
}

.rank-list small {
    grid-column: 2;
    margin-top: -8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 84px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background:
        radial-gradient(circle at 82% 18%, rgba(245, 158, 11, 0.22), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.95));
}

.slim-hero {
    padding: 76px 0 70px;
}

.ranking-hero {
    background:
        radial-gradient(circle at 72% 18%, rgba(249, 115, 22, 0.24), transparent 26rem),
        radial-gradient(circle at 12% 28%, rgba(245, 158, 11, 0.16), transparent 22rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.95));
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 160px auto;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
}

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

.filter-panel button {
    padding: 0 18px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
}

.empty-state {
    display: none;
    margin: 28px 0;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    color: var(--muted-strong);
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
    display: block;
}

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

.category-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 22px;
    padding: 18px;
    transition: 0.25s ease;
}

.category-visual {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-card h2,
.info-card h2,
.story-card h2,
.player-section h2 {
    margin: 8px 0 12px;
    font-size: 26px;
}

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

.info-card,
.story-card {
    padding: 26px;
    transition: 0.25s ease;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 36px 0 76px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.24;
    filter: blur(2px);
}

.detail-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.82));
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-shell {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 28px;
    color: var(--muted);
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 34px;
    align-items: center;
}

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

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

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

.detail-tags {
    margin-top: 20px;
}

.detail-tags a:hover {
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.34);
}

.player-section {
    padding-top: 0;
}

.video-box {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.76));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--orange));
    box-shadow: 0 18px 44px rgba(245, 158, 11, 0.38);
    font-size: 28px;
    line-height: 1;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding-top: 0;
}

.genre-card {
    grid-column: 1 / -1;
}

.genre-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ranking-card .rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    z-index: 2;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.82);
}

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

.footer-grid p {
    max-width: 420px;
    color: var(--muted);
}

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

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

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

.footer-links a:hover {
    color: #fbbf24;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--muted);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.footer-bottom button {
    border: 0;
    color: #fbbf24;
    background: transparent;
}

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

    .menu-toggle {
        display: flex;
    }

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

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

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

@media (max-width: 860px) {
    .hero {
        height: 72vh;
        min-height: 530px;
    }

    .home-search-card,
    .split-layout,
    .detail-grid,
    .detail-content,
    .footer-grid,
    .category-overview {
        grid-template-columns: 1fr;
    }

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

    .home-search-card form {
        display: grid;
    }

    .rank-panel {
        position: static;
    }

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

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

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

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

    .brand-icon {
        width: 40px;
        height: 40px;
    }

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

    .brand-text small {
        display: none;
    }

    .hero {
        min-height: 560px;
    }

    .hero-copy {
        padding-top: 40px;
    }

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

    .hero-actions,
    .detail-meta {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

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

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

    .horizontal-card .poster-wrap {
        aspect-ratio: 2 / 3;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
    }
}
