:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-elevated: #1e293b;
  --line: #334155;
  --text: #ffffff;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --blue: #3b82f6;
  --blue-soft: #60a5fa;
  --cyan: #67e8f9;
  --green: #22c55e;
  --yellow: #facc15;
  --radius: 18px;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.22), transparent 32rem),
    radial-gradient(circle at 80% 8%, rgba(103, 232, 249, 0.12), transparent 30rem),
    var(--bg);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(51, 65, 85, 0.75);
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.35);
}

.brand strong {
  display: block;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--blue-soft), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.main-nav a,
.mobile-panel a,
.footer-links a {
  color: #dbeafe;
  font-size: 14px;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: var(--blue-soft);
}

.header-search {
  width: 292px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f172a;
}

.header-search input {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  color: #e5e7eb;
  border: 0;
  outline: none;
  background: transparent;
}

.header-search button,
.primary-btn,
.ghost-btn,
.play-button {
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.header-search button {
  padding: 0 16px;
  border-radius: 0;
}

.primary-btn,
.ghost-btn,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-weight: 700;
}

.ghost-btn {
  color: #dbeafe;
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: none;
}

.header-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.play-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  color: #e0f2fe;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f172a;
}

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

.mobile-panel.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  isolation: isolate;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.72)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 48%, rgba(2, 6, 23, 0.82) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 44px;
  padding: 56px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 12px;
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.45);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero h1 span,
.gradient-text {
  background: linear-gradient(90deg, var(--blue-soft), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 680px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 18px;
}

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

.hero-meta span,
.meta-chips span,
.tag-row span,
.filter-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  font-size: 13px;
}

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

.hero-panel {
  padding: 20px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

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

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

.hero-mini-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.48);
}

.hero-mini-item img {
  width: 70px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-mini-item strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-mini-item small {
  color: var(--muted);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: max(20px, calc((100% - 1280px) / 2));
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button,
.hero-dot {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dot.active {
  background: var(--blue-soft);
}

.main-wrap,
.page-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 48px 0;
}

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

.section-title h2,
.page-title h1,
.detail-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.1;
}

.section-title p,
.page-title p,
.detail-lead,
.site-footer p,
.desc,
.review-text {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card,
.info-card,
.category-card,
.rank-row,
.search-box,
.player-shell {
  border: 1px solid rgba(51, 65, 85, 0.82);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

.score,
.rank-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #052e16;
  background: #fde68a;
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  right: auto;
  color: #eff6ff;
  background: rgba(37, 99, 235, 0.86);
}

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

.movie-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card h3 a:hover {
  color: var(--blue-soft);
}

.meta-line {
  margin: 6px 0 0;
  color: var(--muted-2);
  font-size: 13px;
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

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

.category-card {
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.72);
}

.category-card small {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--cyan);
}

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

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

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

.rank-row {
  display: grid;
  grid-template-columns: 72px 130px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 12px;
}

.rank-number {
  color: var(--yellow);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 130px;
  height: 82px;
  object-fit: cover;
  border-radius: 14px;
}

.page-hero {
  padding: 64px 0 24px;
}

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

.search-box {
  margin: 28px 0;
  padding: 22px;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
}

.search-controls input,
.search-controls select {
  width: 100%;
  padding: 13px 14px;
  color: #e5e7eb;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #0f172a;
}

.detail-hero {
  position: relative;
  min-height: 54vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(51, 65, 85, 0.78);
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.05);
  transform: scale(1.03);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.6)),
    linear-gradient(0deg, #020617, transparent 65%);
}

.detail-content {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  min-height: 54vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 46px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.detail-body {
  padding: 46px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 28px;
}

.info-card {
  padding: 22px;
}

.info-card + .info-card {
  margin-top: 18px;
}

.info-card h2,
.info-card h3 {
  margin: 0 0 14px;
}

.player-shell {
  overflow: hidden;
  margin-bottom: 28px;
}

.player-frame {
  position: relative;
  background: #000000;
}

.player-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(0, 0, 0, 0.36));
  transition: opacity 0.2s ease, pointer-events 0.2s ease;
}

.play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.player-note {
  padding: 12px 16px;
  color: var(--muted);
  border-top: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(15, 23, 42, 0.92);
}

.breadcrumb {
  padding: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--blue-soft);
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid rgba(51, 65, 85, 0.78);
  background: rgba(2, 6, 23, 0.95);
}

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

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

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

@media (max-width: 1080px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

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

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 68px;
  }

  .brand strong {
    font-size: 18px;
  }

  .brand small {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 42px 0 96px;
  }

  .hero-panel {
    width: 100%;
    padding: 14px;
  }

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

  .hero-controls {
    left: 16px;
    right: auto;
  }

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

  .rank-row {
    grid-template-columns: 48px 92px minmax(0, 1fr);
  }

  .rank-row img {
    width: 92px;
    height: 64px;
  }

  .rank-row .primary-btn {
    grid-column: 2 / -1;
  }

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

  .detail-content {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
  }

  .detail-title {
    font-size: 28px;
  }

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

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

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

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