:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --blue: #38bdf8;
  --cyan: #22d3ee;
  --accent: #2563eb;
  --shadow: 0 24px 60px rgba(14, 165, 233, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(34, 211, 238, 0.08));
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.25);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #dbeafe;
  font-size: 15px;
}

.main-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--blue);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 12px;
  padding: 9px 12px;
}

main {
  min-height: 70vh;
}

.hero {
  padding: 34px 0 26px;
}

.hero-shell {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(120deg, #2563eb 0%, #0891b2 52%, #14b8a6 100%);
  box-shadow: var(--shadow);
}

.hero-shell:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.24) 0, rgba(255, 255, 255, 0) 28%), radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.24) 0, rgba(34, 211, 238, 0) 30%), linear-gradient(135deg, rgba(15, 23, 42, 0.25), rgba(2, 6, 23, 0.62));
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.7fr);
  gap: 24px;
  align-items: center;
  padding: 48px;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-kicker,
.section-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #dff8ff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 26px;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  background: #eff6ff;
}

.btn-ghost {
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
  position: relative;
  z-index: 2;
  aspect-ratio: 3 / 4;
  max-height: 430px;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-poster:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.65) 100%);
}

.hero-poster-title {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  font-weight: 800;
  font-size: 19px;
}

.hero-dots {
  position: absolute;
  left: 48px;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 28px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #ffffff;
}

.section {
  padding: 28px 0 42px;
}

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

.section-title,
.page-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc,
.page-desc {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 760px;
}

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

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

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

.movie-card {
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 24px 64px rgba(14, 165, 233, 0.24);
}

.movie-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(34, 211, 238, 0.12));
}

.movie-card-large .poster-frame,
.detail-poster {
  aspect-ratio: 3 / 4;
}

.poster-frame:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.72) 100%);
}

.card-badge,
.card-year {
  position: absolute;
  z-index: 2;
  top: 14px;
  border-radius: 999px;
  padding: 6px 11px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(90deg, #2563eb, #22d3ee);
}

.card-badge {
  left: 14px;
}

.card-year {
  right: 14px;
  background: rgba(2, 6, 23, 0.78);
}

.play-hover {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.86);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card h2,
.rank-card h2,
.category-card h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

.movie-card p,
.rank-card p,
.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #cbd5e1;
  font-size: 13px;
}

.card-meta span,
.rank-meta span,
.detail-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

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

.category-card {
  min-height: 160px;
  border-radius: 22px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 26px 60px rgba(14, 165, 233, 0.2);
}

.category-card .icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.category-card.red { background: linear-gradient(135deg, #ef4444, #f43f5e); }
.category-card.blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.category-card.cyan { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.category-card.rose { background: linear-gradient(135deg, #e11d48, #fb7185); }
.category-card.violet { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.category-card.emerald { background: linear-gradient(135deg, #059669, #10b981); }
.category-card.amber { background: linear-gradient(135deg, #d97706, #f59e0b); }
.category-card.orange { background: linear-gradient(135deg, #ea580c, #f97316); }
.category-card.slate { background: linear-gradient(135deg, #334155, #64748b); }
.category-card.teal { background: linear-gradient(135deg, #0f766e, #14b8a6); }

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

.rank-card {
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.5);
}

.rank-card a {
  display: grid;
  grid-template-columns: 56px 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.rank-card img {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
}

.page-hero {
  padding: 52px 0 26px;
}

.page-hero-box {
  border-radius: 28px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(15, 23, 42, 0.92)), linear-gradient(90deg, #0f172a, #111827);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
  margin: 20px 0 28px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.88);
  outline: none;
  padding: 13px 16px;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 26px 0 0;
  color: #bfdbfe;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 26px;
  padding: 28px 0 46px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.74));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  font-size: 34px;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 18px 38px rgba(34, 211, 238, 0.3);
}

.detail-panel,
.content-panel {
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.94));
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.detail-panel {
  overflow: hidden;
}

.detail-panel-body,
.content-panel {
  padding: 24px;
}

.detail-title {
  margin: 20px 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-summary {
  color: #dbeafe;
  font-size: 17px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

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

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

.content-panel p {
  margin: 0;
  color: #cbd5e1;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, #020617, #000000);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 32px;
  padding: 42px 0;
  color: var(--muted);
}

.footer-brand {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 16px;
}

.footer-grid a {
  display: block;
  margin: 7px 0;
  color: #cbd5e1;
}

.footer-grid a:hover {
  color: var(--blue);
}

.footer-bottom {
  padding: 18px 0 24px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .movie-grid,
  .movie-grid.featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .mobile-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.16);
  }

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

  .main-nav a {
    padding: 11px 12px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 30px;
  }

  .hero-poster {
    display: none;
  }

  .hero-shell {
    min-height: 560px;
  }

  .hero-dots {
    left: 30px;
  }

  .section-header,
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rank-card a {
    grid-template-columns: 48px 94px minmax(0, 1fr);
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .page-hero-box {
    padding: 28px;
  }

  .detail-panel-body,
  .content-panel {
    padding: 18px;
  }
}
