:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-300: #cbd5e1;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-900: #0f172a;
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--secondary-50);
  color: var(--secondary-900);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--secondary-900);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  color: var(--white);
  box-shadow: var(--shadow-md);
  font-size: 14px;
}

.brand-text {
  font-size: 21px;
  letter-spacing: 0.02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--secondary-700);
  font-weight: 600;
  white-space: nowrap;
}

.nav-link {
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-600);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 8px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--secondary-700);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-button.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-button.open span:nth-child(2) {
  opacity: 0;
}

.menu-button.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  background: var(--white);
  border-top: 1px solid var(--secondary-200);
}

.mobile-nav.open {
  display: grid;
  gap: 4px;
  animation: slideUp 0.22s ease;
}

.mobile-nav a {
  display: block;
  padding: 12px 8px;
  color: var(--secondary-700);
  font-weight: 700;
  border-radius: 10px;
}

.mobile-nav a:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--secondary-900);
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fadeIn 0.6s ease;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.25));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(720px, 100%);
  color: var(--white);
  animation: slideUp 0.5s ease;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-kicker span {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-600);
  font-weight: 800;
}

.hero-kicker b {
  font-weight: 600;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  color: var(--white);
  background: var(--primary-600);
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.38);
}

.primary-button:hover {
  background: var(--primary-700);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(2, 132, 199, 0.42);
}

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

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

.hero-rating {
  color: var(--accent-400);
  font-size: 18px;
  font-weight: 900;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  color: var(--white);
  font-size: 32px;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.56);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.quick-search {
  margin-top: -52px;
  position: relative;
  z-index: 5;
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(14px);
}

.quick-search h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.quick-search p {
  margin: 10px 0 0;
  color: var(--secondary-600);
}

.search-box,
.filter-bar {
  display: flex;
  gap: 12px;
}

.search-box input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  width: 100%;
  height: 48px;
  border: 1px solid var(--secondary-200);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--secondary-800);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.search-box button {
  height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 22px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 800;
  white-space: nowrap;
}

.search-box button:hover {
  background: var(--primary-700);
}

.section {
  padding: 56px 0;
}

.white-section {
  background: var(--white);
}

.feature-section {
  background: linear-gradient(135deg, var(--primary-50), #fff7ed);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--secondary-600);
}

.text-link {
  color: var(--primary-700);
  font-weight: 800;
}

.text-link:hover {
  color: var(--primary-600);
}

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

.movie-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--secondary-200);
}

.poster img,
.thumb img,
.large-poster img,
.category-covers img,
.panel-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster img,
.movie-card:hover .thumb img,
.movie-card:hover .large-poster img {
  transform: scale(1.055);
}

.rating {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--accent-400);
  font-size: 12px;
  font-weight: 900;
}

.poster-hover,
.large-play,
.play-mini {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(0, 0, 0, 0.36);
  opacity: 0;
  font-size: 44px;
  transition: opacity 0.25s ease;
}

.play-mini {
  font-size: 26px;
}

.movie-card:hover .poster-hover,
.movie-card:hover .large-play,
.movie-card:hover .play-mini {
  opacity: 1;
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  min-height: 45px;
  margin: 0;
  color: var(--secondary-900);
  font-size: 16px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body h3 {
  color: var(--primary-600);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--secondary-500);
  font-size: 12px;
}

.card-tag {
  display: inline-flex;
  margin-top: 12px;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 12px;
  font-weight: 800;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 2px 0 14px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.rail-item {
  flex: 0 0 210px;
}

.rail-actions {
  display: flex;
  gap: 10px;
}

.rail-actions button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--secondary-100);
  color: var(--secondary-700);
  font-size: 26px;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.rail-actions button:hover {
  background: var(--primary-600);
  color: var(--white);
}

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

.category-tile,
.category-panel {
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 140px;
  background: var(--secondary-200);
}

.category-tile h3,
.category-tile p {
  margin-left: 18px;
  margin-right: 18px;
}

.category-tile h3 {
  margin-top: 18px;
  margin-bottom: 6px;
  font-size: 20px;
}

.category-tile p {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--secondary-600);
  font-size: 14px;
}

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

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

.large-poster {
  position: relative;
  min-height: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--secondary-900);
}

.large-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.08));
}

.large-info {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  color: var(--white);
}

.large-info .rating {
  position: static;
  display: inline-flex;
  margin-bottom: 12px;
}

.large-info h3 {
  min-height: auto;
  margin: 0;
  color: var(--white);
  font-size: 26px;
}

.large-info p {
  color: rgba(255, 255, 255, 0.88);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.28), transparent 34%), linear-gradient(135deg, var(--secondary-900), #111827 55%, #0c4a6e);
  color: var(--white);
}

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

.page-hero.slim {
  padding: 72px 0;
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent-400);
  font-weight: 900;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.category-panel {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 180px;
}

.panel-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--secondary-200);
}

.category-panel div:last-child {
  padding: 24px;
}

.category-panel h2 {
  margin: 0;
  font-size: 24px;
}

.category-panel p {
  margin: 10px 0 18px;
  color: var(--secondary-600);
}

.category-panel span {
  color: var(--primary-700);
  font-weight: 900;
}

.filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  margin-bottom: 28px;
}

.filter-bar.search-page {
  grid-template-columns: 2fr 1fr 1fr 1fr;
}

.category-list .movie-card.hidden-card {
  display: none;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.rank-row.compact {
  grid-template-columns: 44px 64px minmax(0, 1fr) auto;
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 900;
}

.rank-row:nth-child(1) .rank-num,
.rank-row:nth-child(2) .rank-num,
.rank-row:nth-child(3) .rank-num {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
}

.rank-row img {
  width: 76px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.rank-row.compact img {
  width: 64px;
}

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

.rank-main strong,
.rank-main em {
  display: block;
}

.rank-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}

.rank-main em {
  color: var(--secondary-500);
  font-size: 13px;
  font-style: normal;
}

.rank-score {
  color: var(--accent-600);
  font-weight: 900;
}

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

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-bg {
  object-fit: cover;
  opacity: 0.38;
  filter: blur(2px);
  transform: scale(1.02);
}

.detail-shade {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.48));
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  min-height: 560px;
  padding: 44px 0;
}

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

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-info h1 {
  margin: 14px 0 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

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

.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  font-size: 13px;
}

.tag-row span {
  background: rgba(2, 132, 199, 0.24);
  color: #e0f2fe;
}

.detail-info .primary-button {
  margin-top: 28px;
}

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

.video-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 16 / 9;
}

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

.video-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.46));
  color: var(--white);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-cover span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-600);
  color: var(--white);
  font-size: 36px;
  box-shadow: 0 18px 45px rgba(2, 132, 199, 0.42);
}

.video-box.ready .video-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.content-panel,
.watch-side {
  padding: 28px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.content-panel h2,
.watch-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-panel h2:not(:first-child) {
  margin-top: 28px;
}

.content-panel p {
  margin: 0;
  color: var(--secondary-700);
  font-size: 16px;
}

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

.movie-card.horizontal {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  align-items: stretch;
}

.movie-card.horizontal .thumb {
  position: relative;
  overflow: hidden;
  background: var(--secondary-200);
}

.movie-card.horizontal .thumb.wide {
  aspect-ratio: 16 / 10;
  height: 100%;
}

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

.movie-card.horizontal h3 {
  min-height: auto;
  font-size: 15px;
  -webkit-line-clamp: 1;
}

.movie-card.horizontal p {
  min-height: auto;
  margin-top: 6px;
  -webkit-line-clamp: 2;
}

.site-footer {
  margin-top: 36px;
  padding-top: 52px;
  color: var(--secondary-300);
  background: var(--secondary-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: var(--white);
  font-size: 20px;
}

.site-footer p {
  color: var(--secondary-400);
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 17px;
}

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

.site-footer a:hover {
  color: var(--primary-500);
}

.footer-bottom {
  margin-top: 38px;
  padding: 20px 16px;
  border-top: 1px solid var(--secondary-800);
  text-align: center;
  color: var(--secondary-400);
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 45;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--primary-600);
  color: var(--white);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@media (max-width: 1180px) {
  .movie-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

  .watch-layout {
    grid-template-columns: 1fr;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

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

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

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

  .panel-covers {
    height: 180px;
  }

  .filter-bar,
  .filter-bar.search-page {
    grid-template-columns: 1fr 1fr;
  }

  .detail-hero-inner {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .header-inner {
    height: 64px;
  }

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

  .hero {
    height: 520px;
  }

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

  .quick-search {
    margin-top: 0;
  }

  .quick-search-inner {
    border-radius: 0;
    width: calc(100% + 24px);
    margin-left: -12px;
  }

  .search-box {
    flex-direction: column;
  }

  .section {
    padding: 40px 0;
  }

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

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

  .card-body {
    padding: 12px;
  }

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

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

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

  .rank-row,
  .rank-row.compact {
    grid-template-columns: 42px 58px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .detail-poster {
    width: min(230px, 70vw);
  }

  .detail-info h1 {
    font-size: 38px;
  }

  .filter-bar,
  .filter-bar.search-page {
    grid-template-columns: 1fr;
  }

  .content-panel,
  .watch-side {
    padding: 20px;
  }

  .movie-card.horizontal {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .back-top {
    right: 18px;
    bottom: 18px;
  }
}
