:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --red: #dc2626;
  --orange: #f97316;
  --amber: #f59e0b;
  --slate: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  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 {
  display: block;
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  background: linear-gradient(90deg, #f87171, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  display: block;
  color: #94a3b8;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  font-size: 15px;
}

.desktop-nav a {
  color: #e5e7eb;
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: #fb923c;
}

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: #334155;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.header-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  border: 0;
  outline: 0;
  font: inherit;
}

.header-search input {
  width: 230px;
  padding: 10px 14px;
  background: transparent;
  color: #ffffff;
}

.header-search input::placeholder {
  color: #cbd5e1;
}

.header-search button,
.search-page-form button {
  border: 0;
  padding: 10px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px 0 20px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: linear-gradient(135deg, #dc2626 0%, #f97316 50%, #f59e0b 100%);
  color: #ffffff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.24), transparent 34%),
    radial-gradient(circle at 78% 10%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.12));
}

.hero-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  background: linear-gradient(0deg, var(--bg), rgba(248, 250, 252, 0));
}

.hero-shell {
  position: relative;
  z-index: 1;
  min-height: 620px;
  display: flex;
  align-items: center;
}

.hero-track {
  width: 100%;
  position: relative;
}

.hero-slide {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 42px;
  animation: fadeUp 0.45s ease both;
}

.hero-slide.is-active {
  display: flex;
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fee2e2;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.hero-copy p {
  max-width: 720px;
  margin: 22px 0 30px;
  color: #fff7ed;
  font-size: clamp(18px, 2.2vw, 25px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-light {
  background: #ffffff;
  color: var(--red);
  box-shadow: 0 14px 28px rgba(255, 255, 255, 0.22);
}

.btn-ghost {
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-poster {
  width: min(340px, 32vw);
  aspect-ratio: 2 / 3;
  flex: 0 0 auto;
  border-radius: 32px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.34);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 72px;
  display: flex;
  gap: 10px;
}

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

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

.quick-categories {
  margin-top: -42px;
  position: relative;
  z-index: 3;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.category-strip a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 16px;
  color: #334155;
  background: #f8fafc;
  font-weight: 800;
}

.category-strip small {
  color: var(--red);
}

.content-section {
  padding: 70px 0;
}

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

.section-head h2 {
  margin: 0;
  color: #1e293b;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

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

.section-head .eyebrow,
.page-hero .eyebrow {
  color: var(--red);
}

.section-more {
  min-width: max-content;
  color: var(--red);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.34), transparent 24%),
    linear-gradient(135deg, #dc2626, #f97316, #f59e0b);
}

.poster.poster-fallback img,
.poster img.is-missing {
  display: none;
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.88);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.26);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.25);
}

.movie-info {
  padding: 16px;
}

.meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.meta-line span,
.detail-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-info h3 {
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-info p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.detail-tags a {
  padding: 4px 9px;
  border-radius: 999px;
  color: #b91c1c;
  background: #fee2e2;
  font-size: 12px;
  font-weight: 700;
}

.movie-card-large .movie-info h3 {
  font-size: 22px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: stretch;
}

.movie-card-horizontal .poster {
  aspect-ratio: auto;
  min-height: 160px;
}

.movie-card-horizontal .movie-info {
  align-self: center;
}

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

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

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

.page-hero {
  padding: 86px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #dc2626, #f97316, #f59e0b);
}

.compact-hero {
  padding: 72px 0;
}

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: #fff7ed;
  font-size: 18px;
}

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

.category-card a {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 190px;
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 12px;
  background: #fee2e2;
}

.category-cover-stack img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #dc2626, #f97316);
}

.category-card-body {
  padding: 24px;
}

.category-card-body span {
  color: var(--red);
  font-weight: 800;
}

.category-card-body h2 {
  margin: 8px 0;
  font-size: 28px;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: 170px 220px 1fr;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  color: #1e293b;
  background: #f8fafc;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0;
  color: #ffffff;
  background: #0f172a;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72)),
    var(--poster-url);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #fecaca;
}

.detail-one-line {
  max-width: 880px;
  color: #fff7ed;
  font-size: 20px;
}

.detail-copy .detail-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-tags {
  margin: 18px 0 24px;
}

.player-section {
  padding: 42px 0 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.big-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.12));
  cursor: pointer;
}

.big-play span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.3);
  font-size: 30px;
}

.player-shell.is-loaded .big-play {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 42px 0 0;
}

.text-panel {
  padding: 26px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

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

.text-panel p {
  margin: 0;
  color: #475569;
  text-align: justify;
}

.search-page-form {
  display: flex;
  width: min(720px, 100%);
  margin-top: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.search-page-form input {
  flex: 1;
  padding: 16px 20px;
  font-size: 16px;
}

.search-page-form button {
  padding-inline: 28px;
}

.search-summary {
  margin-bottom: 24px;
  padding: 15px 18px;
  border-radius: 16px;
  color: #475569;
  background: #ffffff;
}

.site-footer {
  margin-top: 40px;
  padding: 36px 0;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-grid p {
  margin: 6px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

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

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

  .header-search {
    margin-left: auto;
  }

  .menu-toggle {
    display: block;
  }

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

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

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

  .header-search {
    display: none;
  }

  .hero-section,
  .hero-shell {
    min-height: 720px;
  }

  .hero-slide.is-active {
    display: grid;
    gap: 28px;
    padding: 42px 0 90px;
  }

  .hero-poster {
    width: min(260px, 78vw);
    margin: 0 auto;
  }

  .hero-dots {
    bottom: 50px;
  }

  .card-grid,
  .card-grid-featured,
  .ranking-grid,
  .category-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    grid-template-columns: 104px 1fr;
  }

  .category-card a,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .brand-text strong {
    font-size: 18px;
  }

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

  .card-grid {
    gap: 16px;
  }

  .movie-card:not(.movie-card-horizontal) {
    display: grid;
    grid-template-columns: 118px 1fr;
  }

  .movie-card:not(.movie-card-horizontal) .poster {
    aspect-ratio: auto;
  }

  .movie-info p {
    min-height: auto;
  }
}
