:root {
  --color-primary: #0ea5e9;
  --color-primary-dark: #2563eb;
  --color-cyan: #06b6d4;
  --color-ink: #1f2937;
  --color-muted: #667085;
  --color-soft: #f0f9ff;
  --color-card: #ffffff;
  --color-warm: #fff7ed;
  --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(14, 165, 233, 0.18);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  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", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--color-ink);
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 36%, #f8fafc 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0ea5e9, #2563eb, #06b6d4);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0ea5e9;
  background: #ffffff;
  box-shadow: inset 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.brand-name {
  color: #ffffff;
  font-size: 21px;
}

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

.desktop-nav > a,
.nav-dropdown > a {
  color: #ffffff;
  font-weight: 650;
  opacity: 0.95;
  padding: 22px 0;
}

.desktop-nav a:hover,
.desktop-nav .is-active {
  color: #fef3c7;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: -20px;
  width: 210px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #334155;
}

.dropdown-panel a:hover {
  background: #e0f2fe;
  color: #0369a1;
}

.header-search {
  position: relative;
  width: 260px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-panel input {
  width: 100%;
  border: 0;
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  padding: 12px 46px 12px 18px;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.14);
}

.header-search button {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #0284c7;
  background: #e0f2fe;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 28px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-panel > a,
.mobile-category-grid a {
  display: block;
  padding: 11px 14px;
  margin-top: 8px;
  border-radius: 12px;
  color: #0f172a;
  background: #ffffff;
}

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

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

.hero {
  position: relative;
  width: min(1280px, calc(100vw - 32px));
  height: 560px;
  margin: 28px auto 0;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: linear-gradient(120deg, #06b6d4, #2563eb);
}

.hero-track,
.hero-slide,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) saturate(1.1);
  transform: scale(1.05);
}

.hero-shade {
  background: linear-gradient(90deg, rgba(8, 47, 73, 0.92), rgba(37, 99, 235, 0.72), rgba(6, 182, 212, 0.28));
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: 7%;
  top: 50%;
  width: min(560px, 52%);
  transform: translateY(-50%);
  color: #ffffff;
}

.hero-kicker,
.page-hero span,
.section-heading span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #0369a1;
  background: rgba(224, 242, 254, 0.92);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 28px;
  color: #e0f2fe;
  font-size: 19px;
  line-height: 1.8;
}

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

.primary-btn,
.ghost-btn,
.text-link,
.search-page-form button,
.mobile-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-btn {
  padding: 13px 26px;
  color: #ffffff;
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
  box-shadow: var(--shadow-soft);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
  padding: 13px 24px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: absolute;
  z-index: 2;
  right: 7%;
  top: 50%;
  width: min(330px, 30%);
  aspect-ratio: 3 / 4;
  transform: translateY(-50%) rotate(2deg);
  border: 10px solid rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.36);
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 7%;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  background: #ffffff;
}

.home-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 470px);
  gap: 24px;
  align-items: center;
  margin: 30px 0 20px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.home-search-panel h2,
.home-search-panel p {
  margin: 0;
}

.home-search-panel h2 {
  font-size: 24px;
  font-weight: 900;
}

.home-search-panel p {
  margin-top: 6px;
  color: var(--color-muted);
}

.home-search-panel form,
.search-page-form {
  position: relative;
  display: flex;
  gap: 10px;
}

.home-search-panel input {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: #f1f5f9;
  outline: none;
}

.home-search-panel button,
.search-page-form button,
.mobile-search button {
  padding: 0 22px;
  color: #ffffff;
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
}

.section-block {
  margin: 58px 0;
}

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

.section-heading h2 {
  margin: 0;
  color: #1e293b;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
}

.section-heading a {
  color: #0284c7;
  font-weight: 800;
}

.card-grid,
.poster-grid,
.wide-grid,
.category-grid,
.ranking-mini,
.category-overview-grid {
  display: grid;
  gap: 22px;
}

.card-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.card-grid-three {
  grid-template-columns: repeat(3, 1fr);
}

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

.wide-grid,
.editor-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-card);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
  transition: 0.24s ease;
}

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

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

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

.movie-cover img,
.rank-cover img,
.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.movie-card:hover .movie-cover img,
.mini-rank-card:hover img,
.category-tile:hover img,
.side-link:hover img {
  transform: scale(1.06);
}

.cover-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #2563eb;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: 0.24s ease;
}

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

.score-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(239, 68, 68, 0.28);
}

.movie-info {
  padding: 16px;
}

.movie-title {
  display: block;
  margin-bottom: 8px;
  color: #1e293b;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-title:hover,
.rank-info a:hover,
.ranking-copy a:hover {
  color: #2563eb;
}

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

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.movie-meta span,
.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 210px;
}

.movie-card-wide .movie-cover {
  height: 100%;
}

.text-link {
  width: fit-content;
  padding: 8px 0;
  color: #0284c7;
}

.warm-panel,
.cool-panel,
.editor-panel {
  padding: 32px;
  border-radius: 32px;
}

.warm-panel {
  background: linear-gradient(120deg, #fff7ed, #fefce8);
}

.cool-panel {
  background: linear-gradient(120deg, #eff6ff, #ecfeff);
}

.editor-panel {
  background: linear-gradient(120deg, #f5f3ff, #fdf2f8, #fff1f2);
}

.mini-rank-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.09);
}

.mini-rank-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.24s ease;
}

.mini-rank-card strong,
.mini-rank-card em {
  display: block;
  padding: 0 14px;
}

.mini-rank-card strong {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.35;
}

.mini-rank-card em {
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.rank-number {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #ffffff;
  background: #0f172a;
  box-shadow: var(--shadow-card);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  transition: transform 0.24s ease;
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile span {
  margin: 96px 18px 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 0 18px;
  color: #e0f2fe;
  line-height: 1.6;
}

.page-hero {
  margin-top: 28px;
  padding: 66px;
  overflow: hidden;
  border-radius: 34px;
  color: #ffffff;
  background: linear-gradient(120deg, #0891b2, #2563eb, #7c3aed);
  box-shadow: var(--shadow-card);
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  font-weight: 900;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: #dff6ff;
  font-size: 18px;
  line-height: 1.8;
}

.category-hero {
  background: linear-gradient(120deg, #0ea5e9, #2563eb, #06b6d4);
}

.ranking-hero {
  background: linear-gradient(120deg, #f97316, #ef4444, #7c3aed);
}

.search-hero {
  background: linear-gradient(120deg, #0f766e, #0891b2, #2563eb);
}

.search-page-form {
  width: min(620px, 100%);
  margin-top: 28px;
}

.search-page-form input {
  padding: 16px 20px;
}

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

.category-overview-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
  transition: 0.24s ease;
}

.category-overview-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}

.category-thumb-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 120px;
  overflow: hidden;
}

.category-thumb-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-overview-card div:last-child {
  padding: 20px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

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

.category-overview-card span {
  color: #0284c7;
  font-weight: 900;
}

.filter-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-panel label {
  flex: 0 0 auto;
  font-weight: 900;
}

.all-movies-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 52px 130px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.ranking-index {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

.ranking-cover {
  height: 88px;
  overflow: hidden;
  border-radius: 14px;
}

.ranking-copy a {
  display: block;
  margin-bottom: 8px;
  font-size: 19px;
  font-weight: 900;
}

.ranking-copy p {
  margin: 0 0 10px;
  color: var(--color-muted);
  line-height: 1.65;
}

.ranking-copy div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.ranking-copy span {
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
}

.search-state {
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  color: #475569;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.detail-main {
  padding: 30px 0 0;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #2563eb;
}

.player-card,
.detail-card,
.sidebar-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020617;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.58));
}

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

.big-play {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #2563eb;
  background: #ffffff;
  font-size: 38px;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.3);
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

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

.detail-card h2,
.sidebar-card h2 {
  margin: 28px 0 12px;
  font-size: 22px;
  font-weight: 900;
}

.detail-card p,
.sidebar-card p {
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.88;
}

.detail-meta {
  margin: 0 0 24px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

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

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

.detail-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 20px;
}

.sidebar-card {
  padding: 20px;
}

.sidebar-card > img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
}

.side-list {
  display: grid;
  gap: 13px;
}

.side-link {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: 0.2s ease;
}

.side-link:hover {
  background: #f1f5f9;
}

.side-link img {
  width: 92px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  transition: 0.24s ease;
}

.side-link span {
  font-weight: 800;
  line-height: 1.35;
}

.site-footer {
  margin-top: 72px;
  color: #e2e8f0;
  background: linear-gradient(180deg, #1f2937, #0f172a);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 42px;
  padding: 48px 0 34px;
}

.footer-logo .brand-mark {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
}

.footer-logo {
  font-size: 22px;
  color: #ffffff;
}

.footer-brand p,
.site-footer a,
.site-footer li {
  color: #cbd5e1;
}

.footer-brand p {
  max-width: 420px;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

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

.site-footer li {
  margin: 9px 0;
}

.site-footer a:hover {
  color: #67e8f9;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  color: #94a3b8;
  font-size: 14px;
}

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 620px;
  }

  .hero-content {
    top: 34px;
    left: 6%;
    width: 88%;
    transform: none;
  }

  .hero-poster {
    right: 6%;
    top: auto;
    bottom: 58px;
    width: 230px;
    transform: rotate(2deg);
  }

  .home-search-panel,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  .card-grid-three,
  .poster-grid,
  .ranking-mini,
  .category-grid,
  .category-overview-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wide-grid,
  .editor-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  main,
  .page-main,
  .detail-main,
  .header-inner,
  .mobile-panel,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

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

  .hero {
    width: min(100% - 22px, 1180px);
    height: 640px;
    margin-top: 16px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-poster {
    left: 50%;
    right: auto;
    width: 200px;
    transform: translateX(-50%) rotate(2deg);
  }

  .hero-controls {
    left: 24px;
    bottom: 22px;
  }

  .home-search-panel,
  .warm-panel,
  .cool-panel,
  .editor-panel,
  .page-hero,
  .detail-card,
  .sidebar-card {
    padding: 22px;
    border-radius: 22px;
  }

  .home-search-panel form,
  .search-page-form,
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .card-grid,
  .card-grid-three,
  .poster-grid,
  .ranking-mini,
  .category-grid,
  .category-overview-grid,
  .related-grid,
  .all-movies-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .movie-card-wide,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .ranking-cover {
    height: 180px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-title {
    font-size: 15px;
  }

  .movie-info p {
    font-size: 13px;
  }

  .category-tile {
    min-height: 180px;
  }

  .category-tile span {
    margin-top: 70px;
    font-size: 19px;
  }
}
