:root {
  --red-950: #450a0a;
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --amber-900: #78350f;
  --amber-800: #92400e;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-200: #fde68a;
  --amber-100: #fef3c7;
  --green-600: #059669;
  --teal-600: #0d9488;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(69, 10, 10, 0.16);
  --shadow-card: 0 14px 30px rgba(31, 41, 55, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-900);
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 46%, #fef2f2 100%);
  font-family: 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 {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--red-800), var(--red-700), var(--amber-800));
  box-shadow: 0 10px 35px rgba(69, 10, 10, 0.24);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  color: var(--red-950);
  background: linear-gradient(135deg, #fbbf24, #ca8a04);
  box-shadow: 0 12px 24px rgba(120, 53, 15, 0.35);
  font-size: 24px;
  font-weight: 900;
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 24px;
  letter-spacing: 0.04em;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-panel a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--amber-200);
}

.header-search,
.mobile-search,
.big-search {
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.big-search input {
  width: 210px;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  padding: 11px 14px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(253, 230, 138, 0.88);
}

.header-search button,
.mobile-search button,
.big-search button,
.primary-button,
.ghost-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.header-search button,
.mobile-search button {
  padding: 10px 16px;
  color: var(--red-950);
  background: var(--amber-200);
}

.nav-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: transparent;
  font-size: 30px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.mobile-search input {
  width: 100%;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 510px;
  background: linear-gradient(90deg, var(--red-950), var(--amber-900));
}

.hero-slide {
  position: relative;
  display: none;
  min-height: 510px;
}

.hero-slide.active {
  display: block;
  animation: fadeIn 0.55s ease both;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  filter: saturate(1.1) contrast(1.05);
}

.hero-overlay {
  background:
    radial-gradient(circle at 18% 22%, rgba(245, 158, 11, 0.28), transparent 28%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.24) 42%, rgba(0, 0, 0, 0.66));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 52px;
  min-height: 510px;
  padding: 52px 0 78px;
}

.hero-copy {
  color: var(--white);
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 6px 12px;
  border: 1px solid rgba(253, 230, 138, 0.4);
  border-radius: 999px;
  color: var(--amber-200);
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 23px);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  padding: 7px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
}

.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: 12px 22px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(90deg, var(--red-700), var(--amber-600));
  box-shadow: 0 18px 35px rgba(185, 28, 28, 0.32);
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-poster {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  right: 0;
  bottom: 22px;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.hero-controls button {
  cursor: pointer;
}

.hero-prev,
.hero-next {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.32);
  font-size: 32px;
  line-height: 1;
}

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

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

.search-panel {
  position: relative;
  z-index: 8;
  margin-top: -44px;
  padding: 26px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

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

.search-panel p {
  margin: 0 0 18px;
  color: var(--gray-600);
}

.big-search {
  background: var(--gray-100);
}

.big-search input {
  flex: 1;
  width: 100%;
  color: var(--gray-900);
  padding: 15px 18px;
}

.big-search button {
  align-self: stretch;
  padding: 0 24px;
  color: var(--white);
  background: linear-gradient(90deg, var(--red-700), var(--amber-600));
}

.page-section {
  margin-top: 58px;
}

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

.section-heading > span {
  width: 8px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--red-700), var(--amber-500));
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--gray-600);
}

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

.category-card {
  min-height: 160px;
  padding: 22px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(254, 243, 199, 0.72));
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--red-800);
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 14px;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 12px 25px rgba(31, 41, 55, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  background: linear-gradient(180deg, #ffffff, #fffbeb);
  box-shadow: var(--shadow-card);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red-900), var(--amber-700));
}

.poster-frame img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.poster-year {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title:hover {
  color: var(--red-700);
}

.card-body p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  color: var(--gray-600);
  font-size: 13px;
}

.card-meta a,
.card-meta span:last-child {
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--amber-900);
  background: var(--amber-100);
  font-weight: 800;
}

.tag-row span {
  padding: 4px 8px;
  color: var(--gray-700);
  background: var(--gray-100);
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 18px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.rank-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.rank-panel h2 {
  margin: 0;
  color: var(--red-800);
  font-size: 24px;
}

.rank-panel-head a {
  color: var(--amber-800);
  font-weight: 900;
}

.rank-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(209, 213, 219, 0.55);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row img {
  width: 64px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--red-900), var(--amber-700));
}

.rank-row strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-row small {
  display: block;
  margin-top: 6px;
  color: var(--gray-500);
}

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

.category-strip {
  padding: 18px;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.78);
}

.strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.strip-head h3 {
  margin: 0;
  color: var(--red-800);
  font-size: 24px;
}

.strip-head a {
  color: var(--amber-800);
  font-weight: 900;
}

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

.compact-card .poster-frame img {
  aspect-ratio: 16 / 11;
}

.compact-card .card-title {
  min-height: 0;
}

.inner-hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 70px;
  color: var(--white);
  background:
    radial-gradient(circle at 18% 28%, rgba(245, 158, 11, 0.28), transparent 26%),
    linear-gradient(120deg, var(--red-950), var(--red-800), var(--amber-900));
}

.inner-hero h1 {
  max-width: 780px;
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.08;
}

.inner-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
}

.inner-actions {
  margin-top: 24px;
}

.tools-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.08);
}

.card-filter-input,
.card-sort-select {
  min-height: 46px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  border-radius: 999px;
  background: var(--white);
  outline: 0;
}

.card-filter-input {
  flex: 1;
  padding: 0 18px;
}

.card-sort-select {
  padding: 0 16px;
  color: var(--gray-700);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.rank-number {
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--white);
  background: linear-gradient(180deg, var(--red-700), var(--amber-600));
  font-size: 18px;
  font-weight: 900;
}

.ranking-item .movie-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
}

.ranking-item .poster-frame img {
  height: 100%;
  min-height: 150px;
  aspect-ratio: auto;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--gray-950);
}

.detail-bg,
.detail-bg img,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: blur(5px) saturate(1.2);
  transform: scale(1.04);
}

.detail-shade {
  background:
    radial-gradient(circle at 20% 24%, rgba(245, 158, 11, 0.18), transparent 30%),
    linear-gradient(0deg, rgba(3, 7, 18, 0.92), rgba(69, 10, 10, 0.62));
}

.detail-top {
  position: relative;
  z-index: 2;
  padding: 34px 0 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-line {
  max-width: 820px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-weight: 800;
}

.detail-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--gray-950);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.movie-player {
  display: block;
  width: 100%;
  min-height: 320px;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.76));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  color: var(--red-950);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.42);
  font-size: 34px;
}

.player-overlay strong {
  max-width: min(760px, calc(100% - 40px));
  text-align: center;
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1.2;
}

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

.detail-content article {
  padding: 28px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
}

.detail-content h2 {
  margin: 0 0 12px;
  color: var(--red-800);
  font-size: 26px;
}

.detail-content p {
  margin: 0 0 24px;
  color: var(--gray-700);
  font-size: 17px;
}

.detail-content p:last-child {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 72px;
  color: var(--gray-300);
  background: linear-gradient(180deg, var(--gray-900), #000000);
}

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

.site-footer h2 {
  display: inline-block;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--amber-500);
  color: var(--amber-500);
  font-size: 20px;
}

.site-footer p {
  margin: 0;
  color: var(--gray-300);
}

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

.site-footer a:hover {
  color: var(--amber-200);
}

.footer-bottom {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--gray-500);
}

.footer-bottom span:first-child {
  color: var(--amber-500);
  font-weight: 900;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(1.01);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

  .header-search input {
    width: 160px;
  }

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

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

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

  .nav-toggle {
    display: block;
  }

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

  .hero-poster,
  .detail-poster {
    max-width: 260px;
  }

  .rank-panel,
  .detail-side {
    position: static;
  }

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

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

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

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

  .brand-text small {
    display: none;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .hero-carousel,
  .hero-slide,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    gap: 24px;
    padding: 38px 0 82px;
  }

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

  .hero-copy p,
  .detail-line,
  .inner-hero p {
    font-size: 16px;
  }

  .search-panel {
    padding: 20px;
  }

  .big-search,
  .tools-section {
    flex-direction: column;
    align-items: stretch;
    border-radius: 24px;
  }

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

  .category-grid,
  .movie-grid,
  .home-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-number {
    min-height: 42px;
  }

  .detail-top {
    padding-bottom: 40px;
  }

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

  .movie-player {
    min-height: 210px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
  }
}
