:root {
  --bg: #0f1020;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --accent: #f59e0b;
  --rose: #f43f5e;
  --shadow: 0 20px 60px rgba(17, 24, 39, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #faf5ff 0%, #fff7ed 46%, #ffffff 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

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

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

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #25104b;
}

.logo {
  font-size: 22px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.28);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.22);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
}

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: #fff;
  background: #0f1020;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  filter: saturate(1.08) brightness(0.8);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 16, 32, 0.94) 0%, rgba(15, 16, 32, 0.74) 48%, rgba(15, 16, 32, 0.25) 100%), linear-gradient(0deg, rgba(15, 16, 32, 0.9), rgba(15, 16, 32, 0.05));
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 36px;
  padding: 68px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fffbeb;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.07em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #22123d;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.hero-panel {
  position: relative;
  z-index: 4;
  padding: 18px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
}

.hero-panel h2 {
  margin: 4px 0 16px;
  font-size: 18px;
}

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

.hero-mini {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.18s ease, transform 0.18s ease;
}

.hero-mini:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateX(3px);
}

.hero-mini img {
  height: 94px;
  border-radius: 16px;
}

.hero-mini strong {
  display: block;
  line-height: 1.35;
}

.hero-mini span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.search-band {
  position: relative;
  z-index: 10;
  margin-top: -34px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr 190px 130px;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-box input,
.search-box select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  background: #fff;
  outline: none;
}

.search-box input:focus,
.search-box select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.search-results {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-results.is-open {
  display: grid;
}

.search-result-card {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.search-result-card img {
  height: 86px;
  border-radius: 14px;
}

.section {
  padding: 74px 0;
}

.section-soft {
  background: rgba(255, 255, 255, 0.52);
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #20123d;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 44px rgba(17, 24, 39, 0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #581c87, #f59e0b);
}

.rating-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  font-weight: 900;
}

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

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 3.4em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #5b21b6;
  background: #f3e8ff;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 172px;
  overflow: hidden;
  padding: 22px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #f59e0b);
  box-shadow: var(--shadow);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #0f766e, #7c3aed);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #be123c, #f59e0b);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  position: relative;
  z-index: 2;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}

.rank-board {
  margin: 0;
  padding: 18px;
  list-style: none;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.rank-item + .rank-item {
  border-top: 1px solid var(--line);
}

.rank-item a {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 12px;
  padding: 14px 2px;
}

.rank-number {
  color: var(--accent);
  font-weight: 950;
  font-size: 20px;
}

.rank-title {
  font-weight: 800;
}

.rank-score {
  justify-self: end;
  color: #fff;
  background: #111827;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  outline: none;
}

.page-hero {
  padding: 62px 0 38px;
  background: radial-gradient(circle at 20% 0%, rgba(124, 58, 237, 0.22), transparent 36%), radial-gradient(circle at 80% 18%, rgba(245, 158, 11, 0.26), transparent 38%);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 700;
}

.breadcrumb a {
  color: var(--primary);
}

.detail-hero {
  padding: 42px 0 60px;
  color: #fff;
  background: radial-gradient(circle at 16% 6%, rgba(245, 158, 11, 0.35), transparent 30%), linear-gradient(135deg, #0f1020 0%, #2e1065 58%, #7c2d12 100%);
}

.detail-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 34px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 3 / 4;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.36);
}

.detail-title h1 {
  color: #fff;
}

.detail-title p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.meta-row .meta-pill {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.34);
  cursor: pointer;
}

.player-cover.is-hidden {
  display: none;
}

.play-button {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  font-size: 38px;
  cursor: pointer;
}

.content-card {
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.content-card + .content-card {
  margin-top: 22px;
}

.content-card h2 {
  margin: 0 0 14px;
  color: #21103d;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: #4b5563;
}

.site-footer {
  padding: 46px 0;
  color: rgba(255, 255, 255, 0.72);
  background: #0f1020;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 24px;
  align-items: center;
}

.footer-logo {
  color: #fff;
  font-size: 22px;
}

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

.footer-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.is-filter-hidden {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

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

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

  .hero-panel {
    max-width: 520px;
  }

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

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

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

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

  .nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    text-align: center;
  }

  .hero-content {
    min-height: auto;
    padding: 44px 0 82px;
  }

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

  .hero p {
    font-size: 16px;
  }

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

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

  .section {
    padding: 52px 0;
  }

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

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

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

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

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