:root {
  --color-primary: #f97316;
  --color-primary-dark: #ea580c;
  --color-rose: #fb7185;
  --color-pink: #f472b6;
  --color-amber: #f59e0b;
  --color-cyan: #06b6d4;
  --color-blue: #2563eb;
  --color-slate-950: #020617;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-500: #64748b;
  --color-slate-100: #f1f5f9;
  --color-slate-50: #f8fafc;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.10);
  --shadow-card-hover: 0 24px 48px rgba(15, 23, 42, 0.18);
  --container: 1180px;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--color-slate-900);
  background: #fff7ed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--color-primary), var(--color-rose), var(--color-pink));
  box-shadow: 0 12px 30px rgba(234, 88, 12, 0.28);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(154, 52, 18, 0.24);
}

.brand-subtitle {
  display: block;
  margin-top: -3px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  font-weight: 650;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #fff;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(320px, 28vw);
  min-width: 210px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 7px 10px 7px 14px;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.header-search button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  color: var(--color-primary-dark);
  background: #fff;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 800;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.search-panel {
  position: fixed;
  top: 82px;
  left: 50%;
  z-index: 80;
  width: min(760px, calc(100vw - 32px));
  transform: translateX(-50%);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.search-panel[hidden] {
  display: none;
}

.search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #fed7aa;
}

.search-panel-head strong {
  color: var(--color-slate-900);
  font-size: 18px;
}

.search-panel-head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--color-slate-700);
  background: #ffedd5;
  font-size: 20px;
  line-height: 1;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: 68vh;
  overflow: auto;
  padding: 18px 20px 20px;
}

.search-result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #fff7ed;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.search-result-card img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: #fed7aa;
}

.search-result-card strong,
.search-result-card em {
  display: block;
}

.search-result-card strong {
  color: var(--color-slate-900);
  line-height: 1.35;
}

.search-result-card em {
  margin-top: 4px;
  color: var(--color-slate-500);
  font-size: 13px;
  font-style: normal;
}

.search-empty {
  padding: 0 20px 20px;
  color: var(--color-slate-500);
}

.hero-carousel {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  color: #fff;
  background: var(--color-slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.7s ease;
}

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

.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 78% 40%, rgba(249, 115, 22, 0.24), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(680px, 100%);
  padding: 88px 0 116px;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-kicker span,
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-kicker span:first-child {
  background: linear-gradient(90deg, var(--color-primary), var(--color-rose));
}

.hero-content h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(38px, 6.5vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.06em;
  text-shadow: 0 14px 42px rgba(0, 0, 0, 0.34);
}

.hero-content p {
  max-width: 660px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

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

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

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

.btn-primary {
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.34);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-light {
  color: var(--color-slate-900);
  background: #fff;
}

.btn-outline {
  color: var(--color-primary-dark);
  border: 1px solid #fdba74;
  background: #fff7ed;
}

.hero-stat {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
}

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

.hero-dots button {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 64px;
  background: var(--color-primary);
}

.section {
  padding: 64px 0;
}

.section-soft {
  background: linear-gradient(90deg, #ffedd5, #fce7f3);
}

.section-blue {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.section-white {
  background: rgba(255, 255, 255, 0.86);
}

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

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

.section-title span {
  color: var(--color-primary);
}

.section-desc {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--color-slate-500);
}

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

.category-card {
  position: relative;
  min-height: 128px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-card-hover);
}

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

.category-card strong,
.category-card span,
.category-card em {
  position: relative;
  z-index: 1;
  display: block;
}

.category-card strong {
  margin-top: 10px;
  font-size: 18px;
}

.category-card span {
  font-size: 32px;
}

.category-card em {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-style: normal;
}

.gradient-orange {
  background: linear-gradient(135deg, #fb923c, #f43f5e);
}

.gradient-blue {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
}

.gradient-purple {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
}

.gradient-green {
  background: linear-gradient(135deg, #34d399, #059669);
}

.gradient-pink {
  background: linear-gradient(135deg, #f472b6, #e11d48);
}

.gradient-amber {
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.gradient-slate {
  background: linear-gradient(135deg, #64748b, #0f172a);
}

.gradient-cyan {
  background: linear-gradient(135deg, #22d3ee, #0ea5e9);
}

.gradient-red {
  background: linear-gradient(135deg, #f87171, #dc2626);
}

.gradient-indigo {
  background: linear-gradient(135deg, #818cf8, #4f46e5);
}

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

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #fed7aa, #fecdd3);
}

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

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

.card-badge,
.card-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.card-badge {
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.70);
}

.card-type {
  left: 10px;
  bottom: 10px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-rose));
}

.card-body {
  display: flex;
  min-height: 152px;
  flex: 1;
  flex-direction: column;
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  margin: 0;
  color: var(--color-slate-900);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title a:hover {
  color: var(--color-primary);
}

.card-text {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 12px;
  color: var(--color-slate-500);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.card-meta span {
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 750;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 84px 1fr;
  align-items: center;
  gap: 14px;
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 12px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
  font-size: 20px;
  font-weight: 900;
}

.rank-row:nth-child(1) .rank-number {
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.rank-row:nth-child(2) .rank-number {
  background: linear-gradient(135deg, #cbd5e1, #64748b);
}

.rank-row:nth-child(3) .rank-number {
  background: linear-gradient(135deg, #fb923c, #b45309);
}

.rank-row img {
  width: 84px;
  height: 112px;
  border-radius: 14px;
  object-fit: cover;
  background: #fed7aa;
}

.rank-info h3 {
  margin: 0;
  color: var(--color-slate-900);
  font-size: 17px;
  line-height: 1.35;
}

.rank-info h3:hover {
  color: var(--color-primary);
}

.rank-info p {
  margin: 7px 0 0;
  color: var(--color-slate-500);
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--color-slate-900), #7c2d12 58%, #be185d);
  padding: 74px 0;
}

.page-hero::after {
  position: absolute;
  inset: auto -80px -140px auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  content: "";
  background: rgba(249, 115, 22, 0.28);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 30px;
  align-items: start;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--color-slate-950);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.35);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.58);
  transition: opacity 0.25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.play-circle {
  position: relative;
  z-index: 2;
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-rose));
  box-shadow: 0 20px 50px rgba(249, 115, 22, 0.42);
  font-size: 34px;
  transform: translateX(3px);
}

.player-error {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  border-radius: 14px;
  color: #fff;
  background: rgba(127, 29, 29, 0.86);
  padding: 10px 14px;
  font-size: 14px;
}

.player-error[hidden] {
  display: none;
}

.detail-panel {
  border-radius: var(--radius-xl);
  background: #fff;
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.detail-panel h1 {
  margin: 0;
  color: var(--color-slate-900);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.detail-meta span {
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 800;
}

.detail-panel p {
  margin: 0;
  color: var(--color-slate-700);
}

.content-card {
  border-radius: var(--radius-xl);
  background: #fff;
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.content-card + .content-card {
  margin-top: 22px;
}

.content-card h2 {
  margin: 0 0 14px;
  color: var(--color-slate-900);
  font-size: 24px;
  line-height: 1.2;
}

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.tag-list span {
  border-radius: 999px;
  color: var(--color-slate-700);
  background: #f1f5f9;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 750;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(90deg, var(--color-slate-800), var(--color-slate-900));
  padding: 46px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: #fff;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  gap: 8px;
  color: #94a3b8;
  font-size: 14px;
}

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

.footer-bottom {
  margin-top: 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 20px;
  color: #94a3b8;
  font-size: 13px;
}

.utility-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  border-radius: var(--radius-xl);
  background: #fff;
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.utility-bar strong {
  color: var(--color-slate-900);
}

.pagination-note {
  color: var(--color-slate-500);
  font-size: 14px;
}

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

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

@media (max-width: 960px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 4px;
  }

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

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

  .header-search {
    order: 4;
    width: 100%;
  }

  .hero-carousel {
    min-height: 68vh;
  }

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

  .detail-layout,
  .footer-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }
}

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

  .brand {
    font-size: 19px;
  }

  .hero-content {
    padding: 72px 0 102px;
  }

  .section {
    padding: 46px 0;
  }

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

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

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

  .card-body {
    min-height: 138px;
    padding: 12px;
  }

  .rank-row {
    grid-template-columns: 44px 72px 1fr;
  }

  .rank-number {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 16px;
  }

  .rank-row img {
    width: 72px;
    height: 98px;
  }

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

@media (max-width: 420px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

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