:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --line: rgba(255, 255, 255, 0.12);
  --brand: #f59e0b;
  --brand-2: #38bdf8;
  --brand-3: #ec4899;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(236, 72, 153, 0.25), transparent 34%),
    radial-gradient(circle at 86% 2%, rgba(56, 189, 248, 0.22), transparent 30%),
    linear-gradient(135deg, #0f172a 0%, #111827 46%, #1e1b4b 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(20px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links a,
.mobile-toggle,
.filter-chip,
.primary-btn,
.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border-radius: 999px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-links a {
  padding: 9px 14px;
  font-size: 14px;
}

.nav-links a:hover,
.mobile-toggle:hover,
.filter-chip:hover,
.filter-chip.active,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.8);
  background: rgba(245, 158, 11, 0.16);
}

.mobile-toggle {
  display: none;
  padding: 9px 13px;
}

.hero {
  position: relative;
  min-height: 690px;
  padding: 78px 0 56px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 24px 2% auto 2%;
  height: 560px;
  border-radius: 42px;
  background:
    linear-gradient(120deg, rgba(14, 165, 233, 0.24), rgba(236, 72, 153, 0.2), rgba(245, 158, 11, 0.16)),
    rgba(255, 255, 255, 0.05);
  filter: blur(1px);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-visual {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  border-radius: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  padding: 46px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  font-size: 14px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.gradient-text {
  color: transparent;
  background: linear-gradient(90deg, #fef3c7, #38bdf8, #f0abfc);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-subtitle {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 800;
}

.primary-btn {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  box-shadow: 0 14px 32px rgba(236, 72, 153, 0.24);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 30px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.45);
}

.search-box input {
  width: 100%;
  min-height: 44px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 0 12px;
  font-size: 15px;
}

.search-box button {
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  color: #111827;
  background: #fef3c7;
  font-weight: 900;
}

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

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

.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.hero-visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.86));
}

.slide-content {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 1;
}

.slide-content h2 {
  margin: 10px 0 8px;
  font-size: 30px;
  line-height: 1.15;
}

.slide-content p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--muted);
}

.slider-dots {
  position: absolute;
  left: 24px;
  top: 24px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

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

.slider-dots button.active {
  width: 32px;
  background: #fef3c7;
}

.section {
  padding: 44px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.03em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(255, 255, 255, 0.11);
}

.poster-link {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

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

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

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 16px;
  line-height: 1.45;
}

.card-title a:hover {
  color: #fef3c7;
}

.card-text {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin: 8px 0 0;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 76px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #111827;
  background: #fef3c7;
  font-weight: 900;
}

.rank-thumb {
  width: 76px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-main h3 {
  margin: 0;
  font-size: 18px;
}

.rank-main p {
  margin: 6px 0 0;
  color: var(--muted);
}

.page-hero {
  padding: 62px 0 28px;
}

.page-panel {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 36px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  box-shadow: var(--shadow);
}

.page-panel h1 {
  margin: 0;
  font-size: clamp(34px, 4.8vw, 58px);
  letter-spacing: -0.04em;
}

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

.category-card {
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(236, 72, 153, 0.12));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.65);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

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

.player-panel,
.detail-side,
.content-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.player-panel {
  overflow: hidden;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--text);
  background: radial-gradient(circle, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.76));
}

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

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  color: #111827;
  background: #fef3c7;
  font-size: 34px;
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.32);
}

.player-meta,
.content-panel,
.detail-side {
  padding: 22px;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 22px;
}

.content-panel {
  margin-top: 22px;
}

.content-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-panel p {
  color: var(--muted);
}

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

.site-footer {
  margin-top: 52px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(2, 6, 23, 0.35);
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
}

@media (max-width: 1024px) {
  .hero-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .detail-side {
    position: static;
  }
}

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

  .navbar {
    min-height: 64px;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(18px);
  }

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

  .hero {
    min-height: auto;
    padding: 28px 0;
  }

  .hero-copy,
  .page-panel {
    padding: 24px;
  }

  .hero-visual {
    min-height: 430px;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .section-head,
  .rank-item {
    align-items: start;
  }

  .section-head {
    flex-direction: column;
  }

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

  .rank-item {
    grid-template-columns: 44px 60px 1fr;
  }

  .rank-item .ghost-btn {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }
}
