* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #0f172a;
  --card: rgba(15, 23, 42, 0.86);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #fb7185;
  --accent-2: #f97316;
  --blue: #38bdf8;
  --violet: #a78bfa;
  --radius: 28px;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(244, 63, 94, 0.2), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.34);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.main-nav a,
.mobile-nav a,
.footer-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: white;
  background: rgba(148, 163, 184, 0.12);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: white;
  background: rgba(15, 23, 42, 0.78);
}

.mobile-nav {
  display: none;
  padding: 0 24px 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 28px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.7fr);
  gap: 24px;
}

.hero-slider,
.hero-panel,
.page-hero,
.content-section,
.detail-hero,
.footer-inner {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.44));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-slider {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

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

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 0.7s ease;
}

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

.hero-media img,
.detail-bg img,
.category-tile img,
.category-cover img {
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-bg span,
.category-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.14) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 680px;
  padding: clamp(34px, 6vw, 74px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 790px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.25);
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero-desc,
.page-hero p,
.detail-info .lead {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.info-chips,
.hero-actions,
.footer-links,
.inline-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.info-chips span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 13px;
}

.hero-actions {
  margin-top: 28px;
}

.button,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
.hero-search button:hover,
.play-overlay:hover .play-circle {
  transform: translateY(-2px);
}

.button.primary,
.hero-search button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 45px rgba(249, 115, 22, 0.28);
}

.button.ghost {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.button.soft {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.hero-dots {
  position: absolute;
  left: 48px;
  bottom: 36px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.hero-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-search label,
.quick-cats > span,
.mini-head span {
  display: block;
  color: white;
  font-weight: 800;
  margin-bottom: 12px;
}

.search-line,
.filter-bar {
  display: flex;
  gap: 10px;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: white;
  background: rgba(2, 6, 23, 0.52);
  outline: none;
  padding: 13px 14px;
}

select {
  min-width: 140px;
}

.quick-cats div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-cats a,
.inline-links a,
.text-link {
  color: #bfdbfe;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  padding: 8px 11px;
  font-size: 13px;
}

.hero-rank-card,
.copy-grid article,
.category-detail-tile {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.34);
}

.hero-rank-card {
  padding: 18px;
}

.mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.mini-head a,
.section-more {
  color: #fb7185;
  font-weight: 800;
  font-size: 14px;
}

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

.content-section,
.page-hero,
.detail-hero,
.footer-inner {
  max-width: 1440px;
  margin: 0 auto 28px;
}

.content-section {
  padding: 28px;
}

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

.section-head h2,
.copy-grid h2,
.category-detail-tile h2 {
  margin: 10px 0 8px;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.045em;
}

.section-head p,
.copy-grid p,
.category-detail-tile p,
.footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 113, 133, 0.38);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.2), rgba(59, 130, 246, 0.18));
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.32);
}

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

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.meta-line a {
  color: #bae6fd;
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 4.7em;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-compact {
  border-radius: 20px;
}

.movie-card-compact .movie-card-body {
  padding: 12px;
}

.movie-card-compact h3 {
  font-size: 15px;
}

.movie-card-compact p {
  font-size: 12px;
}

.tag-row span {
  padding: 6px 8px;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.6);
}

.category-tile strong,
.category-tile em {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

.category-tile strong {
  bottom: 54px;
  font-size: 22px;
}

.category-tile em {
  bottom: 18px;
  color: var(--soft);
  font-style: normal;
  font-size: 13px;
  line-height: 1.5;
}

.page-hero {
  padding: 56px;
  margin-top: 32px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.6));
}

.slim-hero h1,
.category-hero h1,
.rank-hero h1 {
  font-size: clamp(36px, 6vw, 64px);
}

.filter-bar {
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.filter-bar input {
  flex: 1 1 260px;
}

.filter-bar select {
  flex: 0 0 180px;
}

.empty-state {
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 20px;
  color: var(--muted);
}

.category-detail-grid {
  display: grid;
  gap: 18px;
}

.category-detail-tile {
  padding: 18px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.category-cover {
  height: 150px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.6);
}

.inline-links {
  margin: 14px 0;
}

.text-link {
  display: inline-flex;
  margin-top: 6px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  margin-top: 32px;
  padding: 42px;
  min-height: 560px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.45;
}

.detail-bg span {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.24)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 70%);
}

.detail-poster,
.detail-info {
  position: relative;
  z-index: 2;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.52);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #bfdbfe;
}

.detail-tags {
  margin-top: 18px;
}

.detail-player-section {
  background: rgba(2, 6, 23, 0.86);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  cursor: pointer;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.64));
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 24px 60px rgba(249, 115, 22, 0.35);
  font-size: 32px;
  transition: transform 0.2s ease;
}

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

.copy-grid article {
  padding: 26px;
}

.copy-grid p {
  color: #cbd5e1;
  font-size: 16px;
}

.footer {
  padding: 28px;
}

.footer-inner {
  padding: 34px;
  display: grid;
  gap: 16px;
  text-align: center;
  justify-items: center;
}

.footer-logo {
  font-size: 24px;
}

.copyright {
  font-size: 13px;
}

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

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

  .hero-rank-card {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 920px) {
  .main-nav {
    display: none;
  }

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

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

  .hero,
  .content-section,
  .footer,
  .topbar-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

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

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

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

  .section-head,
  .category-detail-tile,
  .detail-hero,
  .copy-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
  }

  .detail-hero {
    padding: 24px;
  }

  .detail-poster {
    max-width: 280px;
  }

  .page-hero {
    padding: 34px 24px;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-top: 18px;
  }

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

  .hero-content {
    padding: 28px;
  }

  .hero h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .hero-dots {
    left: 28px;
  }

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

  .search-line,
  .filter-bar {
    flex-direction: column;
  }

  .filter-bar select {
    flex-basis: auto;
    width: 100%;
  }
}
