:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.78);
  --card-strong: rgba(30, 41, 59, 0.86);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --amber: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --radius: 22px;
  --shadow: 0 22px 60px rgba(2, 6, 23, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
    radial-gradient(circle at 88% 12%, rgba(239, 68, 68, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #111827;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, #facc15 0%, #f97316 58%, #ef4444 100%);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-text strong,
.footer-brand {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #facc15, #fb923c, #f87171);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  margin-top: 3px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff7ed;
  background: rgba(245, 158, 11, 0.14);
}

.menu-button {
  width: 44px;
  height: 44px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
}

.menu-button span {
  width: 20px;
  height: 2px;
  display: block;
  margin: 0 auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  display: block;
  padding: 13px 16px;
  background: rgba(15, 23, 42, 0.8);
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.38) 100%),
    radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.16), transparent 34rem);
  z-index: 2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-content {
  position: relative;
  z-index: 5;
  min-height: 680px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 42px;
  padding: 80px 0 70px;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--text);
  font-weight: 950;
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 84px);
}

.hero-desc {
  margin: 22px 0 0;
  max-width: 650px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

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

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #facc15 0%, #fb923c 62%, #f87171 100%);
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.26);
}

.btn-ghost {
  color: #ffedd5;
  border: 1px solid rgba(251, 146, 60, 0.36);
  background: rgba(15, 23, 42, 0.72);
}

.hero-card-stack {
  position: relative;
  display: grid;
  gap: 18px;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 21 / 11;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.82) 100%);
}

.hero-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero-mini a {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.7);
}

.hero-mini img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.hero-mini a:hover img {
  transform: scale(1.06);
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.active {
  width: 32px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

main {
  overflow: hidden;
}

.section {
  padding: 72px 0;
}

.section-muted {
  background: rgba(15, 23, 42, 0.34);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-heading h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.section-heading p,
.page-hero p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-heading > a {
  flex: 0 0 auto;
  color: #fed7aa;
  font-weight: 900;
  padding: 10px 15px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.movie-card-link:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(251, 146, 60, 0.48);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.46), 0 0 0 1px rgba(245, 158, 11, 0.08);
}

.poster-wrap {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #0f172a;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.72) 100%);
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #111827;
  border-radius: 50%;
  background: linear-gradient(135deg, #facc15, #fb923c);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 38px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  font-size: 13px;
  background: linear-gradient(135deg, #fde68a, #fb923c);
}

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

.movie-card-body h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin: 8px 0 0;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
}

.card-desc {
  min-height: 48px;
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.72;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: #fed7aa;
  border: 1px solid rgba(251, 146, 60, 0.28);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  min-height: 170px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(239, 68, 68, 0.08)),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.24);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 146, 60, 0.5);
}

.category-card h2 {
  margin: 0;
  color: #fff7ed;
  font-size: 23px;
  font-weight: 950;
}

.category-card p {
  margin: 12px 0 0;
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 14px;
}

.page-hero {
  padding: 86px 0 54px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 80% 18%, rgba(245, 158, 11, 0.16), transparent 28rem),
    rgba(15, 23, 42, 0.38);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 18px;
}

.breadcrumb a {
  color: #fed7aa;
}

.filter-panel {
  margin: 28px 0;
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  color: #fed7aa;
  font-weight: 900;
}

.search-box input,
.select-group select {
  width: 100%;
  min-height: 48px;
  color: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.86);
  outline: none;
}

.search-box input {
  padding: 0 16px;
}

.search-box input:focus,
.select-group select:focus {
  border-color: rgba(251, 146, 60, 0.62);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.select-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.select-group select {
  padding: 0 14px;
}

.empty-state {
  display: none;
  margin: 18px 0 0;
  color: #fed7aa;
  font-weight: 900;
}

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

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

.hot-panel {
  position: sticky;
  top: 96px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.hot-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 950;
}

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

.hot-row {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.54);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: background 0.18s ease, transform 0.18s ease;
}

.hot-row:hover {
  transform: translateX(3px);
  background: rgba(51, 65, 85, 0.68);
}

.hot-row img {
  width: 72px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.hot-row span {
  min-width: 0;
}

.hot-row strong {
  display: block;
  overflow: hidden;
  color: #f8fafc;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hot-row em {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hot-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #facc15, #fb923c);
  font-size: 12px;
  font-weight: 950;
}

.detail-hero {
  padding: 42px 0 24px;
}

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

.watch-card,
.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.watch-stage {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #fff7ed;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.2), transparent 22rem),
    rgba(2, 6, 23, 0.62);
  cursor: pointer;
}

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

.play-circle {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  color: #111827;
  border-radius: 50%;
  background: linear-gradient(135deg, #facc15, #fb923c, #f87171);
  font-size: 34px;
  box-shadow: 0 18px 44px rgba(249, 115, 22, 0.32);
}

.play-title {
  font-size: 18px;
  font-weight: 950;
}

.detail-title {
  padding: 24px;
}

.detail-title h1 {
  font-size: clamp(32px, 5vw, 58px);
}

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

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

.detail-section + .detail-section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.detail-section h2 {
  font-size: 26px;
  margin-bottom: 14px;
}

.detail-section p {
  margin: 0;
  color: #dbeafe;
  line-height: 2;
  font-size: 16px;
}

.side-card {
  padding: 18px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 950;
}

.side-poster {
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #0f172a;
}

.side-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

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

.site-footer {
  padding: 50px 0 30px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

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

.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
  margin: 14px 0 0;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 16px;
  color: #fff7ed;
}

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

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

.footer-links a {
  color: #cbd5e1;
}

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

.copyright {
  margin-top: 28px;
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 1120px) {
  .grid-cards.wide,
  .grid-cards,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-content,
  .ranking-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hot-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: flex;
  }

  .brand-text em {
    display: none;
  }

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

  .hero-content {
    padding: 58px 0 82px;
  }

  .hero-card-stack {
    display: none;
  }

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

  .section {
    padding: 48px 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading > a {
    display: inline-flex;
    margin-top: 16px;
  }

  .grid-cards.wide,
  .grid-cards,
  .category-grid,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .select-group {
    grid-template-columns: 1fr;
  }

  .detail-title,
  .detail-card {
    padding: 18px;
  }
}
