:root {
  --bg: #0f172a;
  --panel: #111827;
  --card: #ffffff;
  --card-soft: #fff7ed;
  --text: #111827;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.25);
  --brand: #ef4444;
  --brand-dark: #dc2626;
  --accent: #f97316;
  --gold: #facc15;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

* {
  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(--text);
  background: #f8fafc;
}

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

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

button,
input {
  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.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

.brand-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.35);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.nav-link,
.nav-categories a {
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-categories a:hover {
  color: #fb7185;
}

.nav-categories {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.site-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(360px, 36vw);
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  overflow: visible;
}

.site-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 12px 14px 12px 18px;
}

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

.site-search button {
  border: 0;
  cursor: pointer;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(460px, 90vw);
  display: none;
  padding: 10px;
  background: #fff;
  color: #111827;
  border-radius: 18px;
  box-shadow: var(--shadow);
  max-height: 420px;
  overflow: auto;
}

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

.search-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.search-panel a:hover {
  background: #fff7ed;
}

.search-panel strong {
  display: block;
  color: #111827;
}

.search-panel span {
  color: #64748b;
  font-size: 13px;
}

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

.hero {
  position: relative;
  min-height: 680px;
  color: #fff;
  background: #020617;
  overflow: hidden;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(248, 113, 113, 0.16), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.8) 43%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86) 0%, transparent 44%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 680px;
  padding-top: 56px;
}

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

.eyebrow {
  display: inline-flex;
  color: #fecaca;
  font-weight: 700;
  margin-bottom: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #fee2e2;
  font-size: clamp(18px, 2.4vw, 26px);
  line-height: 1.55;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.section-link,
.card-link,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.play-button {
  padding: 13px 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 18px 36px rgba(239, 68, 68, 0.32);
}

.ghost-btn {
  padding: 12px 22px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.card-link:hover,
.play-button:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-arrow,
.hero-dot {
  pointer-events: auto;
  cursor: pointer;
  border: 0;
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

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

.hero-dot.active {
  width: 34px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.main-section {
  padding: 58px 0;
}

.main-section.dark {
  color: #fff;
  background: linear-gradient(135deg, #111827, #1e293b);
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.dark .section-head p {
  color: #cbd5e1;
}

.section-link,
.card-link {
  color: var(--brand-dark);
  background: #fff1f2;
  padding: 10px 16px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 16px 50px rgba(15, 23, 42, 0.10);
  border: 1px solid rgba(226, 232, 240, 0.85);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  background: rgba(220, 38, 38, 0.92);
}

.rank-badge {
  right: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.movie-meta-line {
  display: flex;
  gap: 10px;
  color: #f97316;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2 {
  margin: 8px 0;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 900;
}

.movie-card p {
  min-height: 54px;
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.movie-card .tag-list span {
  color: #991b1b;
  background: #fee2e2;
}

.movie-card .card-link {
  margin-top: 12px;
  padding: 7px 12px;
  font-size: 12px;
}

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

.category-card {
  min-height: 180px;
  padding: 24px;
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.96), rgba(249, 115, 22, 0.86)),
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.35), transparent 34%);
  box-shadow: 0 20px 55px rgba(220, 38, 38, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 70px rgba(220, 38, 38, 0.26);
}

.category-card span {
  display: block;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 12px;
}

.category-card p,
.category-card small {
  color: #fff7ed;
  line-height: 1.65;
}

.category-card small {
  display: block;
  margin-top: 14px;
}

.page-hero {
  color: #fff;
  padding: 80px 0 54px;
  background:
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.36), transparent 30%),
    linear-gradient(135deg, #0f172a, #991b1b 62%, #f97316);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 800px;
  margin: 14px 0 0;
  color: #ffedd5;
  font-size: 18px;
  line-height: 1.7;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  margin-bottom: 26px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.filter-bar input {
  flex: 1;
  min-width: 240px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 13px 18px;
  outline: 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 12px 16px;
  color: #991b1b;
  background: #fee2e2;
  font-weight: 800;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
  gap: 28px;
}

.player-card,
.detail-card,
.side-card {
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 16px 54px rgba(15, 23, 42, 0.10);
  overflow: hidden;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(248, 113, 113, 0.18), rgba(2, 6, 23, 0.72));
  z-index: 2;
}

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

.play-button {
  border: 0;
  cursor: pointer;
  font-size: 18px;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #991b1b;
  background: #fee2e2;
  font-weight: 800;
  font-size: 13px;
}

.detail-card h2,
.side-card h2 {
  margin: 24px 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.detail-card p {
  color: #334155;
  line-height: 1.85;
  font-size: 16px;
}

.side-card {
  padding: 18px;
}

.side-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  background: linear-gradient(135deg, #1e293b, #991b1b);
}

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

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

.mini-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
}

.mini-item img {
  width: 74px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.mini-item strong {
  display: block;
  line-height: 1.3;
}

.mini-item span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 36px;
}

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

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

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

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

.footer-links a {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  background: rgba(239, 68, 68, 0.35);
}

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

.hidden-by-filter {
  display: none !important;
}

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

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

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

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

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 24px;
    background: #111827;
    box-shadow: var(--shadow);
  }

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

  .nav-categories {
    flex-wrap: wrap;
    padding-left: 0;
    border-left: 0;
  }

  .site-search {
    flex: 1;
    width: auto;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero-controls {
    bottom: 18px;
  }

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

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

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

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

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

  .site-search {
    display: none;
  }

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

  .hero h1 {
    font-size: 42px;
  }

  .hero p {
    font-size: 17px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .detail-card,
  .side-card {
    padding: 18px;
    border-radius: 22px;
  }
}
