:root {
  color-scheme: light;
  --color-primary: #ef4444;
  --color-primary-dark: #dc2626;
  --color-orange: #f97316;
  --color-amber: #f59e0b;
  --color-slate: #0f172a;
  --color-slate-soft: #1e293b;
  --color-text: #1f2937;
  --color-muted: #64748b;
  --color-line: #e5e7eb;
  --color-bg: #f8fafc;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-orange));
  color: #fff;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.35);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 21px;
  background: linear-gradient(90deg, #fca5a5, #fed7aa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

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

.nav-link:hover,
.nav-link.is-active {
  color: #fb7185;
  transform: translateY(-1px);
}

.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 {
  width: 210px;
  padding: 10px 14px;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
}

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

.header-search button {
  height: 100%;
  padding: 10px 16px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--color-primary), var(--color-orange));
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #fff;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.18), transparent 34%), linear-gradient(135deg, #dc2626 0%, #f97316 52%, #f59e0b 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.02));
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(to top, var(--color-bg), transparent);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 42px;
  padding: 74px 0 104px;
}

.hero-copy h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 710px;
  margin: 0 0 28px;
  font-size: clamp(18px, 2.4vw, 25px);
  color: #fff7ed;
}

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

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

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

.btn-light {
  color: var(--color-primary-dark);
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  align-items: stretch;
  opacity: 0;
  visibility: hidden;
  transform: translateX(30px) scale(0.98);
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

.hero-poster {
  min-height: 430px;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.38);
}

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

.hero-feature {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 430px;
  padding: 28px;
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(20px);
}

.hero-feature h2 {
  margin: 0 0 12px;
  font-size: clamp(25px, 4vw, 42px);
  line-height: 1.15;
}

.hero-feature p {
  margin: 0 0 18px;
  color: #ffedd5;
}

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

.hero-dot {
  width: 38px;
  height: 7px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #fff;
}

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

.content-section:nth-of-type(even) {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

.section-head h1,
.section-head h2,
.page-head h1,
.page-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  color: #111827;
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--color-primary);
  font-weight: 800;
}

.section-more {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--color-primary-dark);
  background: #fee2e2;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

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

.movie-card--horizontal .card-cover {
  min-height: 100%;
  aspect-ratio: auto;
}

.movie-card--large .card-cover {
  aspect-ratio: 16 / 11;
}

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

.movie-card:hover .card-cover img {
  transform: scale(1.06);
}

.cover-badge,
.rank-mark {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
}

.cover-badge {
  right: 12px;
  padding: 5px 10px;
  font-size: 12px;
  background: rgba(239, 68, 68, 0.92);
}

.rank-mark {
  left: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f43f5e, #f59e0b);
}

.card-body {
  padding: 18px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 1.45em;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-meta {
  margin: 8px 0;
  color: var(--color-muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.1em;
  margin: 0 0 12px;
  color: #475569;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-orange));
  box-shadow: var(--shadow-card);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #16a34a, #14b8a6);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 26px;
}

.category-card p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.88);
}

.category-card span {
  font-weight: 800;
}

.page-hero {
  padding: 68px 0;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #f97316 55%, #f59e0b);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.12;
}

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

.filter-bar,
.search-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 34px 0;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.filter-bar input,
.search-box input {
  flex: 1 1 260px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  outline: 0;
}

.filter-chip {
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
  cursor: pointer;
  font-weight: 700;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-orange));
}

.empty-state {
  display: none;
  margin: 24px 0;
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  color: var(--color-muted);
  background: #fff;
}

.watch-hero {
  padding: 44px 0 58px;
  color: #fff;
  background: radial-gradient(circle at 80% 12%, rgba(249, 115, 22, 0.32), transparent 36%), linear-gradient(135deg, #111827, #1e293b 58%, #991b1b);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: #cbd5e1;
  font-size: 14px;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.45);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.25), rgba(15, 23, 42, 0.72));
}

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

.player-play-icon {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-orange));
  box-shadow: 0 20px 46px rgba(239, 68, 68, 0.35);
  font-size: 34px;
}

.movie-panel {
  padding: 22px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
}

.detail-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.movie-panel h1 {
  margin: 20px 0 12px;
  font-size: 30px;
  line-height: 1.2;
}

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

.detail-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #f8fafc;
  font-size: 13px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  padding: 56px 0 76px;
}

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

.content-card h2,
.related-card h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 24px;
  color: #334155;
  font-size: 16px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 78px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
}

.related-item strong {
  display: block;
  color: #111827;
  line-height: 1.3;
}

.related-item span {
  color: var(--color-muted);
  font-size: 13px;
}

.search-results {
  min-height: 360px;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
}

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

.site-footer p {
  max-width: 520px;
  color: #94a3b8;
}

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

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

.footer-bottom {
  padding: 18px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .hero-inner,
  .watch-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .hero-slider,
  .hero-slide,
  .hero-poster,
  .hero-feature {
    min-height: 360px;
  }
}

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

  .brand-text small {
    display: none;
  }

  .hero-inner {
    min-height: 0;
    padding: 48px 0 88px;
  }

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

  .hero-poster {
    display: none;
  }

  .hero-feature {
    min-height: 320px;
  }

  .movie-grid,
  .movie-grid--large,
  .movie-grid--horizontal,
  .category-panel {
    grid-template-columns: 1fr;
  }

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

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

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

  .watch-hero {
    padding: 28px 0 40px;
  }

  .content-card,
  .related-card,
  .movie-panel {
    padding: 20px;
  }
}
