:root {
  --bg: #f5f8fb;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --teal: #0f9f9a;
  --teal-dark: #0f766e;
  --cyan: #0891b2;
  --blue: #2563eb;
  --amber: #f59e0b;
  --red: #dc2626;
  --card: #ffffff;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 14px 35px rgba(15, 23, 42, 0.1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #eef5f8 100%);
  color: var(--ink);
  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,
video {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--teal-dark), var(--cyan));
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.28);
}

.navbar {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.1);
}

.brand-name {
  font-size: 1.18rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: #fff;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: #fde68a;
  transform: translateY(-1px);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: #fff;
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 118, 110, 0.96);
}

.mobile-menu.open {
  display: block;
}

.mobile-link {
  display: block;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 13px 0;
  color: #fff;
  font-weight: 700;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 78px max(18px, calc((100vw - 1180px) / 2)) 40px;
  color: #fff;
  background: linear-gradient(125deg, #0f766e 0%, #0891b2 52%, #2563eb 100%);
}

.hero-bg {
  position: absolute;
  border-radius: 999px;
  filter: blur(52px);
  opacity: 0.28;
  z-index: -1;
}

.hero-bg-one {
  width: 360px;
  height: 360px;
  left: 4%;
  top: 30px;
  background: #ffffff;
}

.hero-bg-two {
  width: 460px;
  height: 460px;
  right: 6%;
  bottom: -130px;
  background: #fbbf24;
}

.hero-slider {
  position: relative;
  min-height: 470px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  gap: clamp(26px, 5vw, 68px);
  align-items: center;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: #d1fae5;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.7rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
  max-width: 700px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: clamp(1.02rem, 2.1vw, 1.38rem);
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.detail-tags .main-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
  color: var(--teal-dark);
  background: #fff;
  box-shadow: 0 14px 30px rgba(255, 255, 255, 0.22);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

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

.hero-poster {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 3 / 4;
  justify-self: center;
  overflow: hidden;
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(15, 118, 110, 0.48));
  box-shadow: 0 30px 85px rgba(0, 0, 0, 0.28);
}

.hero-poster::after,
.poster-frame::after,
.player-cover-image::after,
.tile-mini-poster::after,
.category-preview-row span::after,
.ranking-poster::after {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  text-align: center;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 32%), linear-gradient(145deg, #0f766e, #0891b2 48%, #1d4ed8);
}

.hero-poster.image-missing::after,
.poster-frame.image-missing::after,
.player-cover-image.image-missing::after,
.tile-mini-poster.image-missing::after,
.category-preview-row span.image-missing::after,
.ranking-poster.image-missing::after {
  display: grid;
}

.hero-poster img,
.poster-frame img,
.tile-mini-poster img,
.category-preview-row img,
.ranking-poster img,
.player-cover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.hero-poster:hover img,
.movie-card:hover img,
.category-tile:hover img,
.category-card-large:hover img,
.ranking-row:hover img {
  transform: scale(1.08);
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, -50%);
}

.hero-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

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

.hero-dot.active {
  width: 34px;
  background: #fff;
}

.hero-search {
  width: min(760px, 100%);
  margin: 28px auto 0;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

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

.hero-search button {
  border: 0;
  padding: 0 28px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(90deg, var(--teal-dark), var(--cyan));
  cursor: pointer;
}

.hero-category-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.hero-category-strip a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-category-strip a:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

.hero-category-strip em {
  color: #fde68a;
  font-style: normal;
}

main {
  min-height: 60vh;
}

.content-section,
.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

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

.section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
}

.section-head p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-weight: 900;
}

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

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

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--soft-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(145deg, #0f766e, #0891b2, #2563eb);
}

.poster-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  background: var(--teal-dark);
}

.poster-badge.accent {
  background: var(--red);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.card-body h3 {
  min-height: 44px;
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.card-link:hover h3 {
  color: var(--teal-dark);
}

.card-meta,
.card-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.card-line {
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 32px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 92px;
  border-radius: 24px;
  padding: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

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

.rank-panel h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 900;
}

.rank-panel a {
  color: var(--teal-dark);
  font-weight: 900;
}

.rank-list {
  display: grid;
  gap: 9px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: #ecfeff;
  transform: translateX(3px);
}

.rank-no {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--teal-dark), var(--cyan));
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.rank-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.category-tile,
.category-card-large {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-tile {
  min-height: 210px;
  padding: 24px;
}

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

.category-count {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  height: 38px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(90deg, var(--teal-dark), var(--cyan));
}

.category-tile h3,
.category-large-body h2 {
  margin: 18px 0 8px;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-tile p,
.category-large-body p {
  margin: 0;
  color: var(--muted);
}

.tile-mini-poster {
  position: absolute;
  right: -10px;
  bottom: -18px;
  width: 92px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(145deg, #0f766e, #2563eb);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
  transform: rotate(7deg);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 68px max(18px, calc((100vw - 1180px) / 2));
  color: #fff;
  background: linear-gradient(120deg, var(--teal-dark), var(--cyan), var(--blue));
}

.small-hero h1,
.category-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.8rem);
}

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

.category-large-link {
  display: block;
  height: 100%;
}

.category-preview-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  height: 180px;
  background: linear-gradient(145deg, #0f766e, #0891b2);
}

.category-preview-row span {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #0f766e, #2563eb);
}

.category-large-body {
  padding: 22px;
}

.category-large-body h2 {
  margin-top: 0;
}

.category-large-body strong {
  display: inline-flex;
  margin-top: 18px;
  color: var(--teal-dark);
  font-weight: 900;
}

.catalog-tools {
  margin-bottom: 28px;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  padding: 14px 16px;
  color: var(--ink);
  background: #f8fafc;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

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

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--ink);
  font-weight: 900;
  background: #ecfeff;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
  color: #fff;
  background: linear-gradient(90deg, var(--teal-dark), var(--cyan));
  transform: translateY(-1px);
}

.filter-empty {
  display: none;
  margin: 16px 0 0;
  color: var(--red);
  font-weight: 800;
}

.filter-empty.show {
  display: block;
}

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

.ranking-row {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ranking-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--soft-shadow);
}

.ranking-link {
  display: grid;
  grid-template-columns: 58px 64px minmax(0, 1fr) 24px;
  gap: 18px;
  align-items: center;
  padding: 12px 16px;
}

.ranking-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--teal-dark), var(--cyan));
}

.ranking-poster {
  position: relative;
  width: 58px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(145deg, #0f766e, #2563eb);
}

.ranking-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ranking-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.02rem;
}

.ranking-info em,
.ranking-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-style: normal;
}

.ranking-arrow {
  color: var(--teal-dark);
  font-size: 2rem;
  font-weight: 300;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumb a {
  color: var(--teal-dark);
  font-weight: 900;
}

.detail-card {
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.36);
  cursor: pointer;
}

.player-cover.hidden {
  display: none;
}

.player-cover-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.5;
  background: linear-gradient(145deg, #0f766e, #2563eb);
}

.player-cover-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 50% 42%, transparent 0, rgba(0, 0, 0, 0.26) 34%, rgba(0, 0, 0, 0.82) 100%);
}

.play-core {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--teal-dark);
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease;
}

.player-cover:hover .play-core {
  transform: scale(1.08);
}

.player-cover strong {
  position: relative;
  z-index: 2;
  margin-top: 110px;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.62);
}

.detail-content {
  padding: clamp(24px, 4vw, 42px);
}

.detail-tags {
  margin-top: 0;
}

.detail-tags span,
.detail-tags .main-tag {
  color: var(--teal-dark);
  background: #ecfeff;
  backdrop-filter: none;
}

.detail-tags .main-tag {
  color: #fff;
  background: linear-gradient(90deg, var(--teal-dark), var(--cyan));
}

.detail-content h1 {
  margin: 22px 0 14px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-one-line {
  margin: 0;
  padding: 18px 20px;
  border-left: 5px solid var(--amber);
  border-radius: 0 16px 16px 0;
  color: #78350f;
  font-size: 1.1rem;
  font-weight: 800;
  background: #fffbeb;
}

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

.detail-meta-grid div {
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
}

.detail-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.detail-meta-grid strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
}

.text-block {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.text-block h2 {
  margin: 0 0 14px;
  font-size: 1.5rem;
  font-weight: 900;
}

.text-block p {
  margin: 0;
  color: #475569;
  white-space: pre-line;
}

.review-block {
  padding: 24px;
  border: 1px solid #ccfbf1;
  border-radius: 20px;
  background: linear-gradient(135deg, #f0fdfa, #ecfeff);
}

.related-section {
  width: 100%;
  padding-bottom: 0;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 34px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.9fr 1fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 16px;
  color: #fff;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-grid p {
  margin: 0;
  color: #cbd5e1;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #5eead4;
}

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

[data-card].is-hidden {
  display: none;
}

@media (max-width: 1080px) {
  .movie-grid,
  .compact-grid,
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .rank-panel {
    position: static;
  }

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

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

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

  .menu-toggle {
    display: flex;
  }

  .hero-shell {
    padding-top: 46px;
  }

  .hero-slider {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-tags,
  .hero-actions {
    justify-content: center;
  }

  .hero-poster {
    width: min(300px, 82vw);
  }

  .hero-search {
    border-radius: 24px;
    flex-direction: column;
  }

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

  .section-head {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 10px;
  }

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

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

  .ranking-link {
    grid-template-columns: 44px 54px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-arrow {
    display: none;
  }
}

@media (max-width: 560px) {
  .navbar,
  .content-section,
  .detail-layout,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    font-size: 1rem;
  }

  .hero-slider {
    min-height: 690px;
  }

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

  .card-body {
    padding: 11px;
  }

  .card-body h3 {
    min-height: 38px;
    font-size: 0.9rem;
  }

  .card-line {
    display: none;
  }

  .category-preview-row {
    height: 135px;
  }

  .detail-content {
    padding: 20px;
  }

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

  .play-core {
    width: 68px;
    height: 68px;
  }

  .player-cover strong {
    margin-top: 90px;
  }
}
