:root {
  --bg: #0a0d24;
  --bg-soft: #101533;
  --bg-deep: #060816;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f3f4f6;
  --muted: #b8bfd8;
  --dim: #8f97b6;
  --blueberry: #7d60f5;
  --blueberry-light: #9d8df9;
  --night: #6ab7ff;
  --hot: #f9c846;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 96, 245, 0.65) rgba(10, 13, 36, 0.55);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(125, 96, 245, 0.26), transparent 26rem),
    radial-gradient(circle at 90% 10%, rgba(106, 183, 255, 0.18), transparent 30rem),
    linear-gradient(180deg, #0a0d24 0%, #1a1a3e 48%, #0a0d24 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body::-webkit-scrollbar-track {
  background: rgba(10, 13, 36, 0.7);
}

body::-webkit-scrollbar-thumb {
  background: rgba(125, 96, 245, 0.75);
  border-radius: 999px;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 13, 36, 0.72);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blueberry-light), var(--blueberry));
  box-shadow: 0 0 28px rgba(125, 96, 245, 0.58);
}

.brand-text,
.footer-brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, var(--blueberry-light), var(--night));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 20px rgba(125, 96, 245, 0.35);
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.site-menu a {
  color: #d8dcf0;
  font-size: 0.95rem;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.site-menu a:hover {
  color: var(--blueberry-light);
  text-shadow: 0 0 10px rgba(157, 141, 249, 0.8);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.nav-search input {
  width: 210px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 8px 8px 8px 12px;
}

.nav-search input::placeholder,
.page-search-input::placeholder,
.hero-search input::placeholder {
  color: rgba(216, 220, 240, 0.66);
}

.nav-search button,
.primary-btn,
.ghost-btn,
.text-link {
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.nav-search button,
.primary-btn {
  background: linear-gradient(135deg, var(--blueberry-light), var(--blueberry));
  box-shadow: 0 14px 34px rgba(125, 96, 245, 0.36);
}

.nav-search button {
  padding: 8px 14px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.nav-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(125, 96, 245, 0.48);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

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

.home-page {
  padding-top: 96px;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 25, 0.92) 0%, rgba(5, 8, 25, 0.75) 43%, rgba(5, 8, 25, 0.18) 100%),
    linear-gradient(0deg, rgba(5, 8, 25, 0.78) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(680px, calc(100% - 44px));
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 62px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 14px;
  border: 1px solid rgba(157, 141, 249, 0.44);
  border-radius: 999px;
  color: var(--blueberry-light);
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(125, 96, 245, 0.15);
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #fff, var(--blueberry-light), var(--night));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p,
.page-hero p,
.lead-text {
  max-width: 740px;
  margin: 22px 0 0;
  color: #d9def5;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #dfe4ff;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-controls {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 13, 36, 0.58);
  backdrop-filter: blur(16px);
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: #fff;
  background: transparent;
}

.hero-prev,
.hero-next {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.7rem;
  line-height: 1;
}

.hero-prev:hover,
.hero-next:hover {
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.is-active {
  width: 28px;
  background: var(--blueberry-light);
  box-shadow: 0 0 16px rgba(157, 141, 249, 0.9);
}

.hero-search {
  position: absolute;
  left: 62px;
  right: 62px;
  bottom: 32px;
  z-index: 4;
  display: flex;
  width: min(560px, calc(100% - 124px));
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 0 18px;
}

.hero-search button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--blueberry-light), var(--blueberry));
}

.stars {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.stars i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 16px #fff;
  animation: twinkle 3s ease-in-out infinite;
}

.stars i:nth-child(1) { left: 12%; top: 18%; animation-delay: 0.1s; }
.stars i:nth-child(2) { left: 28%; top: 12%; animation-delay: 0.6s; }
.stars i:nth-child(3) { left: 44%; top: 26%; animation-delay: 1.1s; }
.stars i:nth-child(4) { left: 63%; top: 16%; animation-delay: 1.6s; }
.stars i:nth-child(5) { left: 82%; top: 24%; animation-delay: 2.1s; }
.stars i:nth-child(6) { left: 75%; top: 64%; animation-delay: 2.6s; }
.stars i:nth-child(7) { left: 20%; top: 72%; animation-delay: 3.1s; }
.stars i:nth-child(8) { left: 52%; top: 78%; animation-delay: 3.6s; }

.content-section {
  margin-top: 52px;
}

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

.section-head h2,
.article-section h2,
.category-card h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.15;
}

.section-head p,
.category-card p,
.site-footer p,
.movie-desc,
.article-section p {
  color: var(--muted);
  line-height: 1.8;
}

.section-head p {
  margin: 8px 0 0;
}

.section-head a,
.text-link {
  color: var(--blueberry-light);
  font-weight: 800;
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.012);
  border-color: rgba(157, 141, 249, 0.58);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(157, 141, 249, 0.2);
}

.movie-card-large {
  grid-column: span 2;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.movie-card-large .poster-link {
  aspect-ratio: 16 / 9;
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 56%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent);
}

.play-pill {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  background: rgba(125, 96, 245, 0.92);
  box-shadow: 0 0 28px rgba(125, 96, 245, 0.72);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #0a0d24;
  font-weight: 900;
  background: linear-gradient(135deg, #fff4ad, var(--hot));
  box-shadow: 0 12px 24px rgba(249, 200, 70, 0.26);
}

.movie-card-body {
  padding: 16px;
}

.movie-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #fff;
  font-weight: 900;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-title:hover {
  color: var(--blueberry-light);
}

.rating {
  flex-shrink: 0;
  color: var(--hot);
  font-weight: 900;
}

.movie-desc {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  margin: 10px 0 12px;
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--dim);
  font-size: 0.84rem;
}

.tag-row {
  margin-top: 12px;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(125, 96, 245, 0.18), rgba(255, 255, 255, 0.07)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

.category-tile {
  min-height: 170px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(157, 141, 249, 0.52);
}

.category-tile span,
.category-card h2 a {
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile strong,
.category-tile em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
  line-height: 1.7;
}

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

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.section-head.small h2 {
  font-size: 1.45rem;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-list a:hover {
  transform: translateX(3px);
  background: rgba(125, 96, 245, 0.16);
}

.rank-list span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #0a0d24;
  font-weight: 900;
  background: var(--hot);
}

.rank-list strong,
.rank-list em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-list em {
  grid-column: 2;
  color: var(--dim);
  font-size: 0.82rem;
  font-style: normal;
}

.inner-page {
  padding-top: 110px;
}

.page-hero,
.detail-hero,
.player-section,
.article-section,
.category-card,
.list-toolbar {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: -35% -20% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(125, 96, 245, 0.28);
  filter: blur(40px);
}

.page-hero > * {
  position: relative;
  z-index: 1;
}

.list-toolbar {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
}

.strong-toolbar {
  position: sticky;
  top: 88px;
  z-index: 8;
}

.page-search-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  outline: 0;
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 18px;
}

.page-search-input:focus {
  border-color: rgba(157, 141, 249, 0.75);
  box-shadow: 0 0 0 4px rgba(125, 96, 245, 0.16);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #dfe4ff;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 14px;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  border-color: rgba(157, 141, 249, 0.72);
  background: rgba(125, 96, 245, 0.36);
}

.empty-state {
  display: none;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
}

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

.category-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

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

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

.category-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--dim);
}

.breadcrumb a:hover {
  color: var(--blueberry-light);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  padding: clamp(20px, 4vw, 38px);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

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

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-info h1 {
  font-size: clamp(2.1rem, 4.8vw, 4.4rem);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #dfe4ff;
  background: rgba(255, 255, 255, 0.09);
}

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

.player-section,
.article-section {
  margin-top: 38px;
  padding: clamp(18px, 4vw, 30px);
}

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

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: #000;
  z-index: 2;
}

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: blur(1px) saturate(1.05);
}

.player-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(125, 96, 245, 0.12), rgba(0, 0, 0, 0.72));
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-trigger {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  font-size: 2rem;
  background: rgba(125, 96, 245, 0.94);
  box-shadow: 0 0 48px rgba(125, 96, 245, 0.76);
}

.article-section {
  display: grid;
  gap: 14px;
}

.article-section h2 {
  margin-top: 16px;
}

.article-section h2:first-child {
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(10, 13, 36, 0.68);
  backdrop-filter: blur(16px);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

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

.footer-links a:hover {
  color: var(--blueberry-light);
}

.copyright {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--dim);
  text-align: center;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.28;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.45);
  }
}

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

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

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

  .two-column-section {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 920px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    white-space: normal;
    overflow: visible;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(10, 13, 36, 0.94);
    box-shadow: var(--shadow);
  }

  .site-menu.is-open {
    display: flex;
  }

  .site-menu a {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .site-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .hero-carousel {
    min-height: 620px;
  }

  .hero-content {
    width: 100%;
    min-height: 510px;
    padding: 34px;
  }

  .hero-search {
    left: 24px;
    right: 24px;
    bottom: 82px;
    width: auto;
  }

  .hero-controls {
    right: 24px;
    bottom: 24px;
  }

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

  .movie-card-large {
    grid-column: span 1;
  }

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

  .detail-hero {
    grid-template-columns: 1fr;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .nav-shell,
  .page-shell,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .home-page,
  .inner-page {
    padding-top: 88px;
  }

  .hero-carousel {
    min-height: 690px;
    border-radius: 24px;
  }

  .hero-content {
    justify-content: flex-start;
    min-height: 560px;
    padding: 28px 22px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .hero-actions,
  .page-actions {
    flex-direction: column;
  }

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

  .hero-search {
    flex-direction: column;
    gap: 8px;
    border-radius: 22px;
  }

  .hero-search input,
  .hero-search button {
    width: 100%;
    min-height: 44px;
  }

  .hero-controls {
    left: 24px;
    justify-content: space-between;
  }

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

  .movie-card-body {
    padding: 12px;
  }

  .movie-desc {
    display: none;
  }

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

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

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-poster {
    max-width: 100%;
  }

  .player-box {
    border-radius: 18px;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .catalog-grid,
  .rank-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }
}
