:root {
  --bg: #f7fbff;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.88);
  --text: #111827;
  --muted: #64748b;
  --line: #e5edf6;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --teal: #14b8a6;
  --green: #10b981;
  --orange: #f97316;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 28px rgba(37, 99, 235, 0.11);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.16), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #eef8ff 100%);
}

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

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

main {
  min-height: 60vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.nav-shell {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 15px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
}

.brand-text {
  font-size: 23px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-menu,
.main-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-links a,
.category-drop-button,
.category-drop-panel a {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 13px;
  cursor: pointer;
  transition: 0.2s ease;
}

.main-links a:hover,
.main-links a.active,
.category-drop-button:hover,
.category-drop-panel a:hover,
.category-drop-panel a.active {
  color: var(--blue);
  background: #eff6ff;
}

.category-drop {
  position: relative;
}

.category-drop-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 200px;
  padding: 8px;
  display: none;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.category-drop-panel a {
  display: block;
  width: 100%;
  text-align: left;
}

.category-drop:hover .category-drop-panel,
.category-drop.open .category-drop-panel {
  display: block;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: #334155;
  font-size: 20px;
}

.page-shell,
.hero-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 22px;
}

.hero-shell {
  padding-top: 30px;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 34px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  gap: 34px;
  align-items: center;
  padding: 68px;
  opacity: 0;
  transform: translateX(4%);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.74) 46%, rgba(15, 23, 42, 0.15)),
    radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.55), transparent 32rem),
    radial-gradient(circle at 85% 70%, rgba(20, 184, 166, 0.45), transparent 32rem);
  z-index: 1;
}

.hero-copy,
.hero-cover-wrap {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.section-head span,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f766e;
  background: #ccfbf1;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero-kicker {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(147, 197, 253, 0.25);
}

.hero-copy h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  color: #ffffff;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 650px;
  color: #dbeafe;
  font-size: 18px;
  margin: 0 0 24px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #e2e8f0;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.tag-row span,
.detail-tags span {
  background: #eef6ff;
  color: #2563eb;
}

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

.btn-primary,
.btn-secondary,
.btn-light,
.section-more,
.text-link,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.search-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  padding: 12px 18px;
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.24);
}

.btn-secondary,
.btn-light {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  padding: 11px 17px;
  backdrop-filter: blur(10px);
}

.btn-light {
  color: var(--blue);
  background: #ffffff;
  border-color: var(--line);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-light:hover,
.section-more:hover,
.text-link:hover,
.search-button:hover {
  transform: translateY(-2px);
}

.hero-cover-wrap {
  justify-self: end;
  width: min(100%, 410px);
}

.hero-cover {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(20, 184, 166, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

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

.hero-cover::after,
.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.86), transparent);
  pointer-events: none;
}

.hero-floating {
  position: absolute;
  right: -18px;
  bottom: 26px;
  z-index: 3;
  width: 210px;
  padding: 14px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(14px);
}

.hero-floating strong {
  display: block;
  font-size: 24px;
}

.hero-dots {
  position: absolute;
  left: 68px;
  bottom: 42px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.active {
  background: #ffffff;
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 20px;
  padding: 12px;
  border-radius: 22px;
  background: var(--panel-soft);
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--line);
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 0 14px;
  font: inherit;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.quick-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.section-block {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 22px;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 12px 0 8px;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

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

.section-more,
.text-link {
  color: var(--blue);
  background: #eff6ff;
  padding: 10px 14px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(20, 184, 166, 0.12));
}

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

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

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.score {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
}

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

.movie-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  min-height: 20px;
}

.movie-card h2 {
  margin: 8px 0 8px;
  font-size: 19px;
  line-height: 1.28;
}

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

.movie-card p {
  height: 52px;
  margin: 0 0 12px;
  color: #475569;
  font-size: 14px;
  overflow: hidden;
}

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

.category-tile {
  position: relative;
  min-height: 145px;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow: var(--soft-shadow);
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

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

.category-tile h2,
.category-tile h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-tile p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.mini-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--soft-shadow);
}

.mini-card img {
  width: 72px;
  height: 88px;
  border-radius: 14px;
  object-fit: cover;
  background: #e2e8f0;
}

.mini-card strong {
  display: block;
  color: #0f172a;
  line-height: 1.3;
}

.mini-card small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.mini-rank {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 3;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--teal));
}

.page-title,
.detail-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 22px 26px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px 170px;
  gap: 12px;
  margin: 24px 0;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.18), transparent 26rem),
    linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.16);
  background: #dbeafe;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-title h1 {
  margin-top: 12px;
  font-size: clamp(34px, 5vw, 64px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid var(--line);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.content-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 22px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
}

.content-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #ffffff;
  padding: 24px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.content-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 24px;
}

.content-panel p {
  color: #334155;
  margin: 0 0 18px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.45));
  border: 0;
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 24px 44px rgba(37, 99, 235, 0.32);
  font-size: 28px;
  padding-left: 4px;
}

.player-card.playing .play-layer {
  opacity: 0;
  visibility: hidden;
}

.player-error {
  display: none;
  padding: 12px 14px;
  color: #fecaca;
  background: #7f1d1d;
  font-size: 14px;
}

.player-card.error .player-error {
  display: block;
}

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

.related-grid .movie-card h2 {
  font-size: 16px;
}

.related-grid .movie-card p {
  display: none;
}

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

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 22px 34px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

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

.site-footer p {
  color: #94a3b8;
  margin: 12px 0 0;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 22px 28px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.empty-hint {
  display: none;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
}

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

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

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

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

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

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .main-links {
    flex-direction: column;
    align-items: stretch;
  }

  .main-links a,
  .category-drop-button {
    width: 100%;
    text-align: left;
  }

  .category-drop-panel {
    position: static;
    display: grid;
    width: 100%;
    box-shadow: none;
    border-radius: 16px;
    margin-top: 8px;
  }

  .hero-slider {
    min-height: 780px;
    border-radius: 26px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: start;
    padding: 34px 26px;
  }

  .hero-cover-wrap {
    justify-self: stretch;
    width: 100%;
    max-width: 360px;
  }

  .hero-dots {
    left: 26px;
    bottom: 24px;
  }

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

  .movie-grid,
  .mini-list,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 540px) {
  .nav-shell,
  .page-shell,
  .hero-shell,
  .section-block,
  .page-title,
  .detail-hero,
  .content-layout {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .hero-slider {
    min-height: 820px;
  }

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

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

  .movie-grid,
  .mini-list,
  .related-grid,
  .category-strip,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
