:root {
  --twilight-950: #3b0764;
  --twilight-900: #4c1d95;
  --twilight-700: #7e22ce;
  --twilight-600: #9333ea;
  --twilight-400: #c084fc;
  --dusk-700: #a21caf;
  --dusk-600: #c026d3;
  --dusk-400: #e879f9;
  --sunset-500: #f97316;
  --sunset-300: #fdba74;
  --ink: #090312;
  --line: rgba(255, 255, 255, 0.12);
  --muted: rgba(255, 255, 255, 0.68);
  --soft: rgba(255, 255, 255, 0.1);
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(62, 9, 92, 0.72);
  --shadow: 0 24px 70px rgba(8, 2, 18, 0.45);
}

* {
  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;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 8%, rgba(168, 85, 247, 0.32), transparent 34rem),
    radial-gradient(circle at 88% 18%, rgba(217, 70, 239, 0.22), transparent 32rem),
    linear-gradient(135deg, #3b0764 0%, #581c87 48%, #4a044e 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.5));
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.space-blocks {
  display: grid;
  gap: 64px;
  padding-bottom: 80px;
}

.glass-effect {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.gradient-text,
.brand-text,
.footer-brand span:last-child {
  background: linear-gradient(90deg, #d8b4fe 0%, #f0abfc 52%, #fdba74 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glow-text,
.hero-content h1 {
  text-shadow: 0 0 26px rgba(192, 132, 252, 0.56);
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(30, 8, 54, 0.56);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 12px 30px rgba(147, 51, 234, 0.45);
}

.brand-text {
  font-size: clamp(20px, 2.2vw, 28px);
}

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

.main-nav a,
.mobile-panel a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
  color: #d8b4fe;
}

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

.nav-search input,
.mobile-search input,
.intro-search input,
.filter-controls input,
.filter-controls select {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-search input,
.mobile-search input {
  width: 200px;
  padding: 10px 12px;
}

.nav-search input:focus,
.mobile-search input:focus,
.intro-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(216, 180, 254, 0.85);
  background: rgba(255, 255, 255, 0.14);
}

.nav-search button,
.mobile-search button,
.intro-search button,
.filter-controls button {
  border: 0;
  border-radius: 14px;
  padding: 10px 16px;
  color: #ffffff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
  background: rgba(44, 8, 72, 0.96);
}

.mobile-panel.open {
  display: grid;
  gap: 14px;
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  width: auto;
}

.hero-carousel {
  position: relative;
  min-height: 78vh;
  margin-top: 0;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 3, 31, 0.94) 0%, rgba(27, 8, 49, 0.72) 43%, rgba(27, 8, 49, 0.22) 100%),
    linear-gradient(0deg, rgba(59, 7, 100, 1) 0%, rgba(59, 7, 100, 0.24) 52%, rgba(0, 0, 0, 0.28) 100%);
}

.hero-slide::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), rgba(217, 70, 239, 0.1), transparent 62%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 78vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 140px 0 92px;
  max-width: min(1280px, calc(100% - 32px));
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.05;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.7;
}

.hero-tags,
.tag-list,
.detail-meta,
.card-meta,
.hero-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #f5e8ff;
  font-size: 13px;
  background: rgba(147, 51, 234, 0.48);
  border: 1px solid rgba(216, 180, 254, 0.22);
  backdrop-filter: blur(10px);
}

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

.btn-primary,
.btn-ghost,
.rank-watch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 14px 42px rgba(139, 92, 246, 0.5);
}

.btn-primary:hover,
.rank-watch:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 52px rgba(217, 70, 239, 0.42);
}

.btn-ghost {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-stats {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.hero-stats span {
  padding-right: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-stats span:last-child {
  border-right: 0;
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 56px;
  background: #d8b4fe;
}

.home-intro {
  margin: -48px auto 64px;
  position: relative;
  z-index: 5;
  width: min(1280px, calc(100% - 32px));
}

.intro-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
  border-radius: 28px;
  padding: 28px;
}

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

.intro-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.intro-search {
  display: flex;
  gap: 10px;
}

.intro-search input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
}

.content-section {
  display: grid;
  gap: 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2,
.filter-panel h2,
.detail-text h2,
.player-section h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
}

.section-more {
  color: #d8b4fe;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(112, 26, 117, 0.28));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(216, 180, 254, 0.45);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(147, 51, 234, 0.32));
}

.movie-card.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.24);
}

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

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

.play-hover {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) scale(0.86);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(147, 51, 234, 0.84);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.card-meta {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.5;
}

.card-body h2 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.rank-info h2 a:hover,
.category-block h2 a:hover {
  color: #d8b4fe;
}

.card-body p {
  margin: 0;
  min-height: 42px;
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(26, 5, 44, 0.94), rgba(26, 5, 44, 0.18));
}

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

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.6;
}

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.58;
}

.sub-page {
  padding-top: 76px;
}

.page-hero {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  margin-bottom: 48px;
  background: linear-gradient(135deg, rgba(59, 7, 100, 0.8), rgba(126, 34, 206, 0.5));
}

.compact-hero {
  min-height: 320px;
}

.page-hero > img,
.page-hero-mask {
  position: absolute;
  inset: 0;
}

.page-hero-mask {
  background: linear-gradient(0deg, rgba(59, 7, 100, 1), rgba(59, 7, 100, 0.72), rgba(0, 0, 0, 0.24));
  z-index: 1;
}

.page-hero-content,
.compact-hero .page-container {
  position: relative;
  z-index: 2;
  padding: 70px 0;
}

.hero-kicker {
  margin-bottom: 12px;
  color: #fdba74;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.6fr;
  gap: 24px;
  align-items: center;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 32px;
}

.filter-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr) auto;
  gap: 10px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
}

.filter-controls select option {
  color: #20122d;
}

.category-block {
  border-radius: 28px;
  padding: 24px;
}

.category-block-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.category-block h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.category-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-preview {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) 2.2fr;
  gap: 20px;
}

.category-cover {
  border-radius: 22px;
  overflow: hidden;
  min-height: 260px;
}

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

.rank-list {
  display: grid;
  gap: 14px;
  padding-bottom: 80px;
}

.rank-row {
  display: grid;
  grid-template-columns: 58px 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-index {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
}

.rank-poster {
  display: block;
  width: 92px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
}

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

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.rank-watch {
  color: #ffffff;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
}

.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 24px 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

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

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  margin-top: -1px;
}

.detail-backdrop,
.detail-mask {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  filter: blur(2px);
  transform: scale(1.02);
}

.detail-mask {
  background:
    linear-gradient(90deg, rgba(16, 3, 31, 0.95), rgba(39, 11, 67, 0.75), rgba(0, 0, 0, 0.28)),
    linear-gradient(0deg, rgba(59, 7, 100, 1), rgba(59, 7, 100, 0.12));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 36px;
  align-items: end;
  padding: 64px 0;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.detail-copy {
  max-width: 780px;
}

.detail-meta {
  margin: 18px 0 18px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.large-tags {
  margin-bottom: 24px;
}

.detail-content {
  display: grid;
  gap: 40px;
  padding: 48px 0 80px;
}

.player-section {
  display: grid;
  gap: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.16), rgba(0, 0, 0, 0.52));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  width: clamp(76px, 10vw, 110px);
  height: clamp(76px, 10vw, 110px);
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 34px;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.95), rgba(217, 70, 239, 0.95));
  box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.08), 0 24px 60px rgba(0, 0, 0, 0.38);
}

.detail-text {
  border-radius: 28px;
  padding: 30px;
}

.detail-text p {
  margin: 12px 0 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.95;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.info-list div {
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.info-list dt {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.info-list dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.site-footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(35, 7, 58, 0.72);
}

.footer-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 12% 0%, rgba(192, 132, 252, 0.24), transparent 32rem);
}

.footer-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 28px;
}

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

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.8;
  font-size: 14px;
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.fade-in {
  animation: fadeIn 0.7s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .main-nav {
    gap: 12px;
  }

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

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

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

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

@media (max-width: 900px) {
  .main-nav,
  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .intro-card,
  .filter-panel,
  .category-preview,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row {
    grid-template-columns: 44px 74px 1fr;
  }

  .rank-watch {
    grid-column: 3;
    width: fit-content;
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 66px;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 72vh;
  }

  .hero-content {
    padding: 120px 0 78px;
  }

  .hero-content h1 {
    font-size: clamp(34px, 14vw, 54px);
  }

  .hero-actions,
  .intro-search,
  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body h2 {
    font-size: 15px;
  }

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

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

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

  .detail-hero {
    min-height: auto;
  }

  .rank-row {
    grid-template-columns: 38px 66px 1fr;
    gap: 12px;
  }

  .rank-info h2 {
    font-size: 18px;
  }

  .rank-info p {
    display: none;
  }

  .info-list {
    grid-template-columns: 1fr;
  }
}
