:root {
    color-scheme: dark;
    --page-bg: #030712;
    --panel-bg: rgba(31, 41, 55, 0.72);
    --panel-strong: rgba(17, 24, 39, 0.92);
    --line: rgba(255, 255, 255, 0.10);
    --muted: #9ca3af;
    --text: #f9fafb;
    --red: #dc2626;
    --red-dark: #991b1b;
    --red-soft: rgba(220, 38, 38, 0.22);
    --yellow: #facc15;
    --green: #22c55e;
    --blue: #60a5fa;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: radial-gradient(circle at top left, rgba(153, 27, 27, 0.34), transparent 36rem), linear-gradient(180deg, #030712 0%, #111827 48%, #030712 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

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

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

img {
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.5), rgba(17, 24, 39, 0.95));
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #991b1b 0%, #b91c1c 50%, #991b1b 100%);
    box-shadow: var(--shadow);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #facc15 0%, #dc2626 100%);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

.logo-text,
.footer-logo span:last-child {
    display: grid;
    line-height: 1.1;
}

.logo-text strong,
.footer-logo strong {
    font-size: 20px;
    background: linear-gradient(90deg, #fef08a, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-text small,
.footer-logo small {
    color: #fecaca;
    font-size: 12px;
    margin-top: 4px;
}

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

.desktop-nav a,
.mobile-nav a {
    position: relative;
    color: #fee2e2;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #fef08a;
}

.desktop-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    border-radius: 999px;
    background: var(--yellow);
}

.top-search,
.mobile-search,
.big-search,
.filter-panel {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-search {
    flex: 0 1 300px;
}

.top-search input,
.mobile-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    outline: none;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    padding: 12px 14px;
}

.top-search input::placeholder,
.mobile-search input::placeholder,
.big-search input::placeholder,
.filter-panel input::placeholder {
    color: #fecaca;
}

.top-search button,
.mobile-search button,
.big-search button,
.primary-button,
.row-button {
    border: none;
    border-radius: 12px;
    background: #facc15;
    color: #7f1d1d;
    font-weight: 800;
    padding: 12px 18px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.primary-button:hover,
.row-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.24);
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 14px 16px 18px;
    background: rgba(127, 29, 29, 0.98);
}

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

.mobile-nav nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #030712;
}

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

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

.hero-backdrop,
.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.12) contrast(1.05);
    transform: scale(1.03);
}

.hero-shade,
.detail-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 76% 40%, rgba(250, 204, 21, 0.16), transparent 18rem), linear-gradient(90deg, rgba(3, 7, 18, 0.98) 0%, rgba(127, 29, 29, 0.88) 45%, rgba(3, 7, 18, 0.68) 100%), linear-gradient(0deg, #030712 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 72px 0 90px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fef08a;
    background: rgba(220, 38, 38, 0.24);
    border: 1px solid rgba(250, 204, 21, 0.28);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
}

.hero h1,
.page-hero h1,
.detail-title-row h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-title-row p {
    max-width: 760px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
    margin: 20px 0 0;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags a {
    border-radius: 999px;
    color: #fecaca;
    background: rgba(220, 38, 38, 0.22);
    border: 1px solid rgba(248, 113, 113, 0.2);
    padding: 6px 10px;
    font-size: 12px;
}

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

.primary-button,
.secondary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    padding: 14px 22px;
}

.secondary-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.ghost-button {
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.28);
    background: rgba(127, 29, 29, 0.18);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.16);
    transform: rotate(2deg);
}

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

.hero-poster span,
.play-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.92);
    color: #fff;
}

.hero-poster span {
    width: 72px;
    height: 72px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 26px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45);
}

.hero-controls {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-controls > button,
.hero-dots button {
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 24px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 34px;
    height: 10px;
    border-radius: 999px;
    padding: 0;
}

.hero-dots button.active {
    background: var(--yellow);
    border-color: var(--yellow);
}

.quick-panel {
    position: relative;
    z-index: 4;
    margin-top: -34px;
}

.quick-inner {
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 22px;
    box-shadow: var(--shadow);
}

.big-search {
    margin-bottom: 16px;
}

.big-search input {
    background: rgba(3, 7, 18, 0.72);
    padding: 16px 18px;
}

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

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

.quick-cats a {
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.24);
    background: rgba(220, 38, 38, 0.16);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
}

.content-stack,
.list-page,
.overview-grid,
.ranking-page,
.detail-layout {
    padding: 54px 0;
}

.home-section {
    margin-bottom: 66px;
}

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

.section-heading span {
    display: block;
    color: #f87171;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 7px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
}

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

.section-heading > a,
.compact-heading > a {
    color: #fca5a5;
    font-weight: 800;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
    background: var(--panel-bg);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(248, 113, 113, 0.4);
    box-shadow: 0 22px 50px rgba(127, 29, 29, 0.26);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

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

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 44%, rgba(0, 0, 0, 0.82) 100%);
}

.play-badge {
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%) scale(0.72);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.cover-label {
    position: absolute;
    z-index: 2;
    left: 10px;
    bottom: 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(220, 38, 38, 0.86);
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.movie-info {
    padding: 14px;
}

.movie-title {
    display: block;
    color: #fff;
    font-weight: 850;
    line-height: 1.35;
    min-height: 43px;
}

.movie-title:hover {
    color: #f87171;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    margin: 8px 0;
}

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: rgba(255, 255, 255, 0.26);
}

.movie-line {
    color: #d1d5db;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    min-height: 26px;
}

.rank-and-category {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 26px;
    align-items: start;
}

.ranking-card,
.category-card-list,
.detail-content-card,
.player-card,
.sticky-card {
    border-radius: var(--radius);
    background: var(--panel-bg);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: var(--shadow);
}

.ranking-card,
.category-card-list,
.detail-content-card,
.sticky-card {
    padding: 24px;
}

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

.compact-heading h2 {
    font-size: 26px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 38px 74px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border-radius: 14px;
    padding: 10px;
    background: rgba(3, 7, 18, 0.38);
    border: 1px solid transparent;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(127, 29, 29, 0.24);
}

.rank-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #7f1d1d;
    background: #facc15;
    font-weight: 900;
}

.rank-item img {
    width: 74px;
    height: 52px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-text {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.rank-text strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-text small {
    color: var(--muted);
}

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

.category-tile,
.category-overview-card {
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.34), rgba(31, 41, 55, 0.72));
    border: 1px solid rgba(255, 255, 255, 0.10);
    overflow: hidden;
}

.category-tile > a {
    display: block;
    padding: 18px;
}

.category-tile span,
.category-overview-card span {
    color: #fca5a5;
    font-size: 13px;
    font-weight: 800;
}

.category-tile h3,
.category-overview-card h2 {
    margin: 8px 0;
}

.category-tile p,
.category-overview-card p {
    color: #d1d5db;
    margin: 0;
    line-height: 1.6;
    font-size: 14px;
}

.category-tile div {
    display: grid;
    gap: 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 18px 18px;
}

.category-tile div a,
.category-links a {
    color: #fecaca;
    font-size: 13px;
}

.page-shell {
    min-height: 70vh;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.48), rgba(17, 24, 39, 0.9));
}

.page-hero {
    padding: 78px 0;
}

.category-hero {
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.58), rgba(30, 58, 138, 0.22));
}

.ranking-hero {
    background: linear-gradient(135deg, rgba(146, 64, 14, 0.42), rgba(127, 29, 29, 0.56));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #d1d5db;
    font-size: 14px;
    margin-bottom: 18px;
}

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

.filter-panel {
    position: sticky;
    top: 84px;
    z-index: 10;
    margin-bottom: 24px;
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 16px;
    box-shadow: var(--shadow);
}

.filter-panel select {
    flex: 0 0 160px;
    color: #fff;
}

.empty-state {
    display: none;
    text-align: center;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(31, 41, 55, 0.7);
    color: #d1d5db;
    padding: 34px;
}

.empty-state.show {
    display: block;
}

.overview-grid {
    display: grid;
    gap: 20px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    padding: 20px;
}

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

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

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.category-links a {
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.18);
    padding: 7px 10px;
}

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

.slim-filter {
    position: static;
}

.ranking-row {
    display: grid;
    grid-template-columns: 58px 108px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border-radius: 18px;
    background: var(--panel-bg);
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 14px;
    margin-bottom: 14px;
}

.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    color: #7f1d1d;
    background: #facc15;
    font-size: 20px;
    font-weight: 900;
}

.ranking-cover img {
    width: 108px;
    height: 76px;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.ranking-info h2 a:hover {
    color: #f87171;
}

.ranking-info p {
    color: #d1d5db;
    margin: 0;
    line-height: 1.6;
}

.row-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.detail-hero {
    min-height: 430px;
}

.detail-overlay {
    background: linear-gradient(90deg, rgba(3, 7, 18, 0.95), rgba(127, 29, 29, 0.66)), linear-gradient(0deg, #030712, transparent 62%);
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    align-items: start;
    margin-top: -62px;
    position: relative;
    z-index: 3;
}

.detail-main {
    min-width: 0;
}

.player-card {
    padding: 12px;
    margin-bottom: 24px;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.24), rgba(0, 0, 0, 0.48));
    color: #fff;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.94);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
    font-size: 30px;
}

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

.detail-content-card h2 {
    margin: 28px 0 12px;
    font-size: 24px;
}

.detail-content-card p {
    color: #d1d5db;
    line-height: 1.9;
    margin: 0;
}

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

.detail-meta-grid div {
    border-radius: 16px;
    background: rgba(3, 7, 18, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px;
}

.detail-meta-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.detail-meta-grid strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.related-section {
    margin-top: 28px;
}

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

.detail-sidebar {
    min-width: 0;
}

.sticky-card {
    position: sticky;
    top: 92px;
}

.sticky-card h2 {
    margin: 0 0 18px;
    font-size: 24px;
}

.site-footer {
    margin-top: 40px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), #000);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.footer-grid p,
.footer-grid li,
.footer-bottom {
    color: var(--muted);
    line-height: 1.8;
}

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

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.footer-grid a:hover {
    color: #f87171;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    padding: 18px 16px 24px;
    font-size: 14px;
}

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

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

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

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

    .detail-layout,
    .rank-and-category {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        display: none;
    }
}

@media (max-width: 820px) {
    .hero,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 54px 0 92px;
        gap: 28px;
    }

    .hero-poster {
        width: min(280px, 82vw);
        margin: 0 auto;
        transform: none;
    }

    .hero h1,
    .page-hero h1,
    .detail-title-row h1 {
        font-size: clamp(34px, 11vw, 54px);
    }

    .big-search,
    .filter-panel,
    .detail-title-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-panel {
        position: static;
    }

    .filter-panel select {
        flex-basis: auto;
    }

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

    .category-mini-grid,
    .footer-grid,
    .category-overview-card,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-row {
        grid-template-columns: 44px 80px minmax(0, 1fr);
    }

    .ranking-cover img {
        width: 80px;
        height: 64px;
    }

    .row-button {
        grid-column: 1 / -1;
    }
}

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

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

    .logo-mark {
        width: 38px;
        height: 38px;
    }

    .logo-text strong {
        font-size: 17px;
    }

    .hero-actions {
        display: grid;
    }

    .movie-grid,
    .large-grid,
    .related-grid {
        gap: 12px;
    }

    .movie-info {
        padding: 12px;
    }

    .movie-title {
        min-height: 38px;
        font-size: 14px;
    }

    .movie-line,
    .tag-row {
        display: none;
    }

    .ranking-row {
        gap: 12px;
    }
}
