:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #e5e7eb;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --slate: #0f172a;
  --slate-2: #1e293b;
  --blue-900: #1e3a8a;
  --purple-900: #581c87;
  --radius: 18px;
  --shadow: 0 14px 32px rgba(15, 23, 42, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

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

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

button, input, select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #fff;
  background: linear-gradient(90deg, #0f172a, #1e293b 52%, #0f172a);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.25);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  box-shadow: 0 12px 24px rgba(37, 99, 235, .35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 15px;
}

.nav-links a {
  color: rgba(255,255,255,.9);
  transition: color .2s ease, transform .2s ease;
}

.nav-links a:hover {
  color: #60a5fa;
}

.nav-search {
  display: flex;
  align-items: center;
  margin-left: 8px;
}

.nav-search input {
  width: 220px;
  border: 0;
  outline: 0;
  color: #fff;
  background: rgba(51, 65, 85, .9);
  border-radius: 999px 0 0 999px;
  padding: 10px 14px;
}

.nav-search input::placeholder {
  color: #cbd5e1;
}

.nav-search button {
  border: 0;
  color: #fff;
  cursor: pointer;
  background: var(--brand);
  padding: 10px 14px;
  border-radius: 0 999px 999px 0;
  transition: background .2s ease;
}

.nav-search button:hover {
  background: var(--brand-dark);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 10px;
}

.nav-toggle:hover {
  background: rgba(255,255,255,.12);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e3a8a 60%, #0f172a);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .75s ease, visibility .75s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .32;
  transform: scale(1.03);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15,23,42,.96), rgba(15,23,42,.45) 42%, rgba(15,23,42,.18)), linear-gradient(90deg, rgba(15,23,42,.94), rgba(30,58,138,.42), rgba(15,23,42,.22));
}

.hero-content {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 96px 0 128px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fde047;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 32px;
  color: #d1d5db;
  font-size: clamp(17px, 2.4vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

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

.btn-primary {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 14px 32px rgba(37, 99, 235, .34);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-glass {
  color: #fff;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
  backdrop-filter: blur(12px);
}

.hero-controls {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(255,255,255,.34);
  transition: width .2s ease, background .2s ease;
}

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

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 5;
  pointer-events: none;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: auto;
}

.section {
  padding: 56px 0;
}

.section-white {
  background: #fff;
}

.section-soft {
  background: linear-gradient(135deg, #eff6ff, #faf5ff);
}

.section-dark {
  color: #fff;
  background: linear-gradient(90deg, #0f172a, #1e3a8a, #0f172a);
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title h2, .page-title h1 {
  margin: 0;
  font-size: clamp(28px, 3.3vw, 38px);
  line-height: 1.15;
}

.section-title p, .page-title p {
  color: var(--muted);
  margin: 8px 0 0;
}

.more-link {
  color: var(--brand);
  font-weight: 800;
}

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

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

.movie-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .09);
  transition: transform .25s ease, box-shadow .25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

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

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.28);
  opacity: 0;
  transition: opacity .25s ease;
}

.movie-card:hover .card-media::after {
  opacity: 1;
}

.play-mark {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 42px;
  opacity: 0;
  transform: scale(.94);
  transition: opacity .25s ease, transform .25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: scale(1);
}

.year-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  color: #fff;
  background: rgba(0,0,0,.78);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
  transition: color .2s ease;
}

.movie-card:hover h3 {
  color: var(--brand);
}

.card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  min-height: 43px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.type-pill {
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 800;
  white-space: nowrap;
}

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

.category-card {
  position: relative;
  display: block;
  min-height: 150px;
  border-radius: 22px;
  color: #fff;
  overflow: hidden;
  padding: 24px;
  box-shadow: 0 16px 30px rgba(15,23,42,.16);
  transition: transform .25s ease, box-shadow .25s ease;
}

.category-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 22px 42px rgba(15,23,42,.22);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 10%, rgba(255,255,255,.32), transparent 36%), rgba(0,0,0,0);
  transition: background .25s ease;
}

.category-card:hover::after {
  background: radial-gradient(circle at 15% 10%, rgba(255,255,255,.38), transparent 38%), rgba(0,0,0,.08);
}

.category-card h3, .category-card p, .category-icon {
  position: relative;
  z-index: 2;
}

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

.category-card p {
  margin: 0;
  color: rgba(255,255,255,.88);
  font-size: 14px;
}

.category-icon {
  font-size: 32px;
}

.from-pink.to-purple { background: linear-gradient(135deg, #ec4899, #9333ea); }
.from-blue.to-cyan { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.from-indigo.to-blue { background: linear-gradient(135deg, #4f46e5, #2563eb); }
.from-rose.to-orange { background: linear-gradient(135deg, #f43f5e, #f97316); }
.from-violet.to-fuchsia { background: linear-gradient(135deg, #7c3aed, #c026d3); }
.from-slate.to-blue { background: linear-gradient(135deg, #334155, #1d4ed8); }
.from-red.to-pink { background: linear-gradient(135deg, #dc2626, #db2777); }
.from-emerald.to-teal { background: linear-gradient(135deg, #059669, #0d9488); }
.from-amber.to-orange { background: linear-gradient(135deg, #d97706, #ea580c); }
.from-orange.to-red { background: linear-gradient(135deg, #f97316, #dc2626); }

.page-hero {
  color: #fff;
  background: linear-gradient(90deg, #1e3a8a, #581c87, #1e3a8a);
  padding: 70px 0;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #dbeafe;
  margin-bottom: 16px;
  font-size: 14px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(15,23,42,.08);
  margin-bottom: 28px;
}

.filter-bar input, .filter-bar select {
  min-width: 200px;
  flex: 1 1 220px;
  border: 1px solid var(--soft);
  border-radius: 999px;
  padding: 12px 16px;
  outline: 0;
  background: #fff;
}

.filter-bar input:focus, .filter-bar select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px #dbeafe;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 150px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(15,23,42,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15,23,42,.14);
}

.rank-num {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.rank-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
}

.rank-heat {
  color: #dc2626;
  font-weight: 900;
  white-space: nowrap;
}

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

.player-card, .detail-card, .side-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(15,23,42,.09);
  overflow: hidden;
}

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

.player-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2,6,23,.82), rgba(2,6,23,.36));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  z-index: 3;
}

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

.player-start span:first-child {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(37,99,235,.95);
  font-size: 42px;
  box-shadow: 0 16px 36px rgba(37,99,235,.34);
}

.player-start span:last-child {
  font-size: 18px;
  font-weight: 800;
}

.player-meta {
  padding: 18px 20px 22px;
}

.player-meta h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

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

.meta-row span, .tag-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 800;
  color: #1d4ed8;
  background: #dbeafe;
}

.detail-card {
  padding: 24px;
  margin-top: 24px;
}

.detail-card h2, .side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-card p {
  color: #374151;
  margin: 0 0 16px;
}

.side-card {
  padding: 18px;
}

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

.side-movie {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-movie img {
  width: 112px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.side-movie h3 {
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.3;
}

.side-movie p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b, #0f172a);
  padding: 44px 0;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer h3, .footer h4 {
  color: #fff;
  margin: 0 0 14px;
}

.footer p, .footer li {
  color: #94a3b8;
  font-size: 14px;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer a:hover {
  color: #60a5fa;
}

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

@media (max-width: 1100px) {
  .movie-grid.four, .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 860px) {
  .nav-inner {
    flex-wrap: wrap;
    padding: 0 16px;
  }

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

  .nav-links, .nav-search {
    display: none;
  }

  .site-header.is-open .nav-links, .site-header.is-open .nav-search {
    display: flex;
    width: 100%;
  }

  .site-header.is-open .nav-links {
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    padding: 0 0 14px;
  }

  .site-header.is-open .nav-search {
    margin: 0 0 14px;
  }

  .nav-search input {
    width: 100%;
  }

  .hero-content {
    padding: 76px 0 110px;
  }

  .rank-item {
    grid-template-columns: 52px 100px minmax(0, 1fr);
  }

  .rank-heat {
    grid-column: 3;
  }

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

@media (max-width: 620px) {
  .brand span:last-child {
    font-size: 17px;
  }

  .container {
    padding: 0 14px;
  }

  .hero {
    min-height: 74vh;
  }

  .hero-content {
    min-height: 74vh;
  }

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

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

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

  .rank-thumb {
    display: none;
  }

  .rank-heat {
    grid-column: 2;
  }

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

  .side-movie {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}
