* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-2: #38bdf8;
  --radius: 22px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #111827 100%);
  color: var(--text);
}

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

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

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #38bdf8);
  box-shadow: 0 12px 26px rgba(56, 189, 248, 0.25);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #f8fafc, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  transition: 0.2s ease;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}

.menu-button {
  display: none;
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 20px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-link {
  padding: 12px;
}

.hero-carousel {
  position: relative;
  height: min(74vh, 760px);
  min-height: 560px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.7s ease, transform 1.1s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.86) 43%, rgba(15, 23, 42, 0.35) 70%, rgba(15, 23, 42, 0.92)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #fde68a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 16px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content h1 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 82px);
}

.hero-content p {
  max-width: 650px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.meta-line,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.meta-line span,
.tag-row span,
.hero-tags span {
  color: var(--soft);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.56);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

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

.primary-button,
.secondary-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button {
  color: #111827;
  padding: 0 22px;
  background: linear-gradient(135deg, #fbbf24, #38bdf8);
  box-shadow: 0 20px 40px rgba(56, 189, 248, 0.22);
}

.secondary-button,
.section-more {
  color: var(--text);
  padding: 0 20px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.primary-button:hover,
.secondary-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  color: var(--text);
  font-size: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.56);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: max(18px, calc((100vw - 1180px) / 2 - 70px));
}

.hero-next {
  right: max(18px, calc((100vw - 1180px) / 2 - 70px));
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.35);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, #fbbf24, #38bdf8);
}

.content-wrap,
.content-section,
.search-band,
.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-band,
.content-section,
.page-hero,
.toolbar,
.detail-content,
.player-section {
  margin-top: 42px;
}

.search-panel,
.page-hero,
.text-panel,
.player-box,
.toolbar,
.category-card,
.movie-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 24px;
  padding: 26px;
  border-radius: var(--radius);
}

.search-panel h2,
.section-heading h2,
.text-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
}

.search-panel p,
.section-heading p,
.page-hero p,
.text-panel p,
.movie-card p,
.category-card p {
  color: var(--muted);
  line-height: 1.75;
}

.search-box,
.select-box {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.search-box input,
.select-box select {
  width: 100%;
  height: 48px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: rgba(2, 6, 23, 0.62);
  padding: 0 15px;
}

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

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

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

.category-card {
  min-height: 150px;
  border-radius: var(--radius);
  padding: 22px;
  transition: 0.2s ease;
}

.category-card span {
  display: inline-flex;
  margin-bottom: 14px;
  color: #f8fafc;
  font-size: 22px;
  font-weight: 850;
}

.category-card:hover,
.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.38);
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  transition: 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.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);
}

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

.poster-play,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  color: #111827;
  border-radius: 50%;
  background: #fbbf24;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  color: #111827;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #38bdf8);
}

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

.meta-line,
.tag-row {
  gap: 7px;
}

.meta-line span,
.tag-row span {
  font-size: 12px;
  padding: 4px 8px;
}

.movie-card h3 {
  margin: 12px 0 8px;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 13px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.page-hero {
  min-height: 270px;
  display: flex;
  align-items: center;
  border-radius: 28px;
  padding: 42px;
  background:
    radial-gradient(circle at 18% 20%, rgba(56, 189, 248, 0.24), transparent 32rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.82));
}

.page-hero.slim h1 {
  font-size: clamp(38px, 6vw, 66px);
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  align-items: end;
  border-radius: 20px;
  padding: 18px;
}

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

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 630px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 40px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

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

.detail-info h1 {
  max-width: 820px;
  font-size: clamp(38px, 6vw, 76px);
}

.lead {
  max-width: 760px;
  color: var(--soft);
  font-size: 20px;
  line-height: 1.8;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 0%, rgba(2, 6, 23, 0.2) 35%, rgba(2, 6, 23, 0.72) 100%);
}

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  color: #111827;
  font-size: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #38bdf8);
  transform: translate(-50%, -50%);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.36);
}

.player-box.is-playing .player-cover {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.text-panel {
  border-radius: 22px;
  padding: 26px;
}

.text-panel p {
  margin: 0;
  color: var(--soft);
  font-size: 17px;
}

.pager-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.pager-links a {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.72);
}

.pager-links a:hover {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.36);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.74);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-inner p {
  margin: 8px 0 0;
}

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

.footer-links a:hover {
  color: var(--text);
}

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

  .menu-button {
    display: inline-flex;
  }

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

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

  .detail-inner {
    grid-template-columns: 260px 1fr;
  }
}

@media (max-width: 760px) {
  .hero-carousel {
    min-height: 620px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 92px;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .toolbar,
  .detail-inner,
  .pager-links,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
  }

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

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

  .page-hero {
    padding: 28px;
  }

  .detail-inner {
    padding: 34px 0;
    gap: 26px;
  }

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

  .lead {
    font-size: 17px;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .content-wrap,
  .content-section,
  .search-band,
  .page-hero,
  .detail-inner,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

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

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

  .mobile-nav.open {
    grid-template-columns: 1fr;
  }
}
