:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --orange-600: #ea580c;
  --orange-500: #f97316;
  --orange-50: #fff7ed;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.14);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-900);
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 22%, #f8fafc 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

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

button,
input,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  overflow-x: hidden;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
  box-shadow: 0 12px 35px rgba(2, 6, 23, 0.28);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 16px 0;
}

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

.brand span:last-child,
.footer-brand span:last-child {
  background: linear-gradient(90deg, var(--orange-500), #ef4444);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-500), #ef4444);
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.35);
  font-size: 15px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

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

.main-nav a:hover {
  color: var(--orange-500);
}

.site-search {
  position: relative;
  display: flex;
  align-items: center;
}

.site-search input {
  width: 240px;
  border: 0;
  border-radius: 999px;
  outline: none;
  padding: 11px 48px 11px 18px;
  color: #fff;
  background: rgba(51, 65, 85, 0.95);
}

.site-search input:focus {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.38);
}

.site-search button {
  position: absolute;
  right: 6px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
  justify-self: end;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  color: #fff;
  background: linear-gradient(120deg, var(--slate-950), var(--slate-800));
  overflow: hidden;
}

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

.hero-slide[data-active="true"] {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(249, 115, 22, 0.28), transparent 28%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.68) 47%, rgba(15, 23, 42, 0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  gap: 46px;
  align-items: center;
  padding: 70px 0 96px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.25);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.meta-pills,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.hero-tags span,
.meta-pills span,
.tag-list span {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

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

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange-600), #ef4444);
  box-shadow: 0 16px 32px rgba(234, 88, 12, 0.35);
}

.button-secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.button-light {
  color: var(--orange-600);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.button-primary:hover,
.button-secondary:hover,
.button-light:hover {
  transform: translateY(-2px);
}

.hero-poster-card {
  position: relative;
  justify-self: center;
  width: min(360px, 100%);
  border-radius: 30px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(20px);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--slate-800), var(--orange-600));
}

.hero-poster-card strong {
  display: block;
  margin: 16px 6px 2px;
  font-size: 20px;
}

.hero-poster-card em {
  display: block;
  margin: 0 6px 8px;
  color: rgba(255, 255, 255, 0.72);
  font-style: normal;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot[data-active="true"] {
  width: 34px;
  background: var(--orange-500);
}

.section {
  padding: 56px 0;
}

.section-soft {
  background: linear-gradient(180deg, #eff6ff, #fff);
}

.section-warm {
  background: linear-gradient(90deg, #fff7ed, #fffbeb);
}

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

.section-title h1,
.section-title h2 {
  margin: 8px 0 8px;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-title p {
  max-width: 720px;
  color: var(--slate-600);
  line-height: 1.8;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 22px;
  overflow: hidden;
  color: var(--slate-900);
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #ea580c);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.55), transparent 55%);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.region-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 24px);
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(234, 88, 12, 0.94);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.card-body strong {
  min-height: 1.4em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.card-meta,
.card-genre,
.card-tags,
.card-desc {
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.5;
}

.card-desc {
  display: -webkit-box;
  min-height: 3em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-tags {
  color: var(--orange-600);
  font-weight: 700;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  border-radius: 26px;
  padding: 26px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
  box-shadow: var(--shadow-card);
}

.category-card:nth-child(3n+1) {
  background: linear-gradient(135deg, #0f172a, #ea580c);
}

.category-card:nth-child(3n+2) {
  background: linear-gradient(135deg, #1e293b, #0891b2);
}

.category-card:nth-child(3n+3) {
  background: linear-gradient(135deg, #111827, #7c3aed);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 25px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.category-card span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 18px;
  font-weight: 800;
  color: #fff;
}

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

.ranking-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 48px 86px 1fr;
  align-items: center;
  gap: 16px;
  border-radius: 20px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
  transition: transform 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-600), #ef4444);
  font-weight: 900;
}

.ranking-item img {
  width: 86px;
  height: 118px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--slate-800), var(--orange-600));
}

.ranking-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ranking-copy strong {
  font-size: 18px;
}

.ranking-copy em {
  color: var(--orange-600);
  font-style: normal;
  font-weight: 700;
}

.ranking-copy span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--slate-600);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 14px;
  margin: 28px 0 30px;
  border-radius: 24px;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  outline: none;
  padding: 13px 18px;
  color: var(--slate-900);
  background: var(--slate-50);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--orange-500);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

.no-results {
  display: none;
  border-radius: 22px;
  padding: 28px;
  color: var(--slate-600);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.no-results.is-visible {
  display: block;
}

.page-hero {
  padding: 76px 0 44px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 10%, rgba(249, 115, 22, 0.33), transparent 27%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

.detail-player-section {
  padding: 38px 0 18px;
  background:
    radial-gradient(circle at 75% 0%, rgba(249, 115, 22, 0.22), transparent 28%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.player-wrap {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.35);
}

.player-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.15), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

.play-overlay span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-600), #ef4444);
  box-shadow: 0 20px 45px rgba(234, 88, 12, 0.38);
  font-size: 34px;
  padding-left: 5px;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  padding: 38px 0 20px;
}

.detail-panel,
.related-panel {
  border-radius: 28px;
  padding: 30px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.detail-lead {
  color: var(--slate-600);
  font-size: 18px;
  line-height: 1.85;
}

.detail-panel h2,
.related-panel h2 {
  margin: 28px 0 14px;
  font-size: 25px;
}

.detail-panel p {
  color: var(--slate-700);
  line-height: 1.9;
}

.detail-panel .meta-pills span,
.detail-panel .tag-list span {
  color: var(--slate-700);
  background: var(--slate-100);
}

.detail-panel .tag-list span {
  color: var(--orange-600);
}

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

.mini-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 13px;
  align-items: center;
  border-radius: 18px;
  padding: 10px;
  background: var(--slate-50);
  transition: transform 0.2s ease, background 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-2px);
  background: var(--orange-50);
}

.mini-card img {
  width: 74px;
  height: 102px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--slate-800), var(--orange-600));
}

.mini-card span {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.mini-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.search-page-grid {
  display: grid;
  gap: 24px;
}

.search-large {
  display: flex;
  gap: 12px;
  border-radius: 24px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.search-large input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 14px 18px;
  outline: none;
}

.search-large button {
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: #fff;
  background: var(--orange-600);
  cursor: pointer;
  font-weight: 800;
}

.site-footer {
  margin-top: 56px;
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

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

.site-footer p {
  max-width: 460px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px 16px;
  text-align: center;
  color: #94a3b8;
}

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

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

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

@media (max-width: 860px) {
  .header-inner {
    grid-template-columns: auto auto;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    grid-column: 1 / -1;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 16px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .site-search {
    grid-column: 1 / -1;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .hero-poster-card {
    display: none;
  }

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

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

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

@media (max-width: 600px) {
  .site-container {
    width: min(100% - 22px, 1280px);
  }

  .brand {
    font-size: 20px;
  }

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

  .hero-copy p,
  .page-hero p,
  .detail-lead {
    font-size: 16px;
  }

  .section {
    padding: 40px 0;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-desc {
    display: none;
  }

  .ranking-item {
    grid-template-columns: 40px 70px 1fr;
    gap: 10px;
  }

  .ranking-item img {
    width: 70px;
    height: 98px;
  }

  .detail-panel,
  .related-panel {
    padding: 20px;
  }

  .play-overlay span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
