:root {
  --page-bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #ea580c;
  --brand-dark: #c2410c;
  --brand-soft: #fed7aa;
  --danger: #dc2626;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.16), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, var(--page-bg) 45%, #ffffff 100%);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.78);
}

.site-nav {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(234, 88, 12, 0.28);
  font-size: 15px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text strong,
.footer-logo strong {
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--brand), #dc2626);
  -webkit-background-clip: text;
  color: transparent;
}

.logo-text small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #374151;
  font-weight: 600;
}

.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--brand);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), #ef4444);
  transition: right 0.2s ease;
}

.nav-links a:hover::after {
  right: 0;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

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

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

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #111827;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.08)),
    radial-gradient(circle at 20% 30%, rgba(234, 88, 12, 0.45), transparent 32rem);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 710px;
  color: #ffffff;
  padding: 80px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(234, 88, 12, 0.88);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
}

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

.hero-copy p {
  margin: 0 0 26px;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
  color: #ffffff;
}

.hero-info span {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #ef4444);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(234, 88, 12, 0.32);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition:
    width 0.2s ease,
    background 0.2s ease;
}

.hero-dots button.active {
  width: 30px;
  background: var(--brand);
}

.search-panel {
  margin-top: -48px;
  position: relative;
  z-index: 3;
}

.search-card {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr auto;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  border: 1px solid rgba(229, 231, 235, 0.74);
}

.search-card input,
.search-card select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  outline: none;
}

.search-card input:focus,
.search-card select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.16);
}

.section {
  padding: 72px 0;
}

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

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

.section-head h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-head p,
.page-title p {
  margin: 10px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid rgba(229, 231, 235, 0.82);
  box-shadow: 0 12px 36px rgba(17, 24, 39, 0.08);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(234, 88, 12, 0.3);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(234, 88, 12, 0.15), rgba(220, 38, 38, 0.12)),
    #f3f4f6;
}

.movie-card-horizontal .poster-link {
  aspect-ratio: 16 / 10;
  min-height: 210px;
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.055);
  filter: saturate(1.08);
}

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(234, 88, 12, 0.94);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 7px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(234, 88, 12, 0.28);
  font-size: 14px;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.card-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.movie-card h3 a:hover {
  color: var(--brand);
}

.movie-card p {
  margin: 0 0 12px;
  min-height: 46px;
  color: var(--muted);
  font-size: 14px;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
}

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

.category-tile {
  padding: 22px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.94), #ffffff);
  border: 1px solid rgba(251, 146, 60, 0.2);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 21px;
}

.category-tile p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.category-tile span {
  color: var(--brand);
  font-weight: 800;
}

.page-hero {
  padding: 64px 0 36px;
  background:
    radial-gradient(circle at top right, rgba(234, 88, 12, 0.2), transparent 28rem),
    linear-gradient(180deg, #ffffff, #fff7ed);
  border-bottom: 1px solid rgba(229, 231, 235, 0.78);
}

.page-title {
  max-width: 760px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--brand);
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 12px;
  margin: 26px 0;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.06);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  font: inherit;
  outline: none;
}

.hidden-card {
  display: none !important;
}

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

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

.movie-card-horizontal .movie-card-body {
  padding: 18px;
}

.text-link {
  color: var(--brand);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.82);
  box-shadow: var(--shadow);
}

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

.player-wrap video {
  width: 100%;
  height: 100%;
  background: #030712;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18)),
    radial-gradient(circle at center, rgba(234, 88, 12, 0.3), transparent 26rem);
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

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

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 22px 44px rgba(234, 88, 12, 0.36);
  cursor: pointer;
}

.player-status {
  padding: 14px 18px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 14px;
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: #374151;
}

.side-card {
  padding: 18px;
}

.side-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  background: #f3f4f6;
}

.side-card h2 {
  margin: 18px 0 12px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f9fafb;
}

.related-item img {
  width: 68px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #f3f4f6;
}

.related-item strong {
  display: block;
  line-height: 1.35;
}

.related-item small {
  color: var(--muted);
}

.empty-result {
  display: none;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.empty-result.is-visible {
  display: block;
}

.site-footer {
  margin-top: 72px;
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #d1d5db;
}

.footer-grid {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr 1fr;
  gap: 28px;
  padding: 54px 0 34px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
  transition: color 0.2s ease;
}

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

.site-footer p {
  color: #9ca3af;
}

.footer-category-links {
  columns: 2;
}

.footer-bottom {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid rgba(156, 163, 175, 0.28);
  color: #9ca3af;
}

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

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

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .nav-links a:hover {
    background: var(--surface-soft);
  }

  .hero {
    min-height: 76vh;
  }

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

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

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

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

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

  .movie-card-horizontal .poster-link {
    min-height: auto;
    aspect-ratio: 2 / 3;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .logo-text strong {
    font-size: 19px;
  }

  .logo-text small {
    display: none;
  }

  .hero-copy {
    padding: 66px 0;
  }

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

  .hero-actions,
  .section-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .detail-card {
    padding: 20px;
  }
}
