:root {
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --blue: #3b82f6;
  --teal: #14b8a6;
  --dark: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--dark);
  background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 46%, #f0fdfa 100%);
  line-height: 1.65;
}

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

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

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

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

.navbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--teal));
  box-shadow: 0 10px 20px rgba(6, 182, 212, 0.28);
}

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

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

.nav-links a,
.mobile-panel a {
  color: #374151;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-panel a:hover {
  color: var(--cyan-dark);
  background: #ecfeff;
}

.menu-toggle {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ecfeff;
  color: var(--cyan-dark);
  font-size: 22px;
}

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 24px rgba(6, 182, 212, 0.28);
}

.btn-secondary {
  color: #374151;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #d1d5db;
}

.btn-secondary:hover {
  color: var(--cyan-dark);
  border-color: #67e8f9;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  padding: 54px 0 70px;
  background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 52%, #f0fdfa 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px), linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 22px 22px;
}

.hero::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -160px;
  top: 20px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.25), transparent 66%);
}

.hero-shell {
  position: relative;
  z-index: 2;
}

.hero-slide {
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 44px;
}

.hero-slide.active {
  display: grid;
  animation: fadeIn 0.55s ease;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan-dark);
  background: rgba(236, 254, 255, 0.82);
  border: 1px solid #a5f3fc;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.12);
}

.hero p {
  color: #4b5563;
  margin: 0 0 24px;
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f766e;
  background: #ccfbf1;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 700;
}

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

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 480px;
  background: #dbeafe;
  box-shadow: 0 32px 80px rgba(6, 182, 212, 0.32);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.04));
}

.poster-caption {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 22px;
  color: #ffffff;
}

.poster-caption strong {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
}

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: #bae6fd;
  transition: background 0.2s ease, width 0.2s ease;
}

.hero-dot.active {
  width: 54px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.section {
  padding: 72px 0;
}

.section.white {
  background: #ffffff;
}

.section.soft {
  background: #f8fafc;
}

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

.section-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 17px;
}

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

.stat-card,
.category-card,
.movie-card,
.info-card,
.related-card,
.rank-row,
.search-panel {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.stat-card,
.category-card {
  padding: 24px;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.stat-card:hover,
.category-card:hover,
.movie-card:hover,
.related-card:hover,
.rank-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  margin-bottom: 14px;
}

.stat-value {
  font-size: 28px;
  font-weight: 900;
}

.stat-label,
.category-card p,
.movie-text p,
.rank-row p,
.detail-meta,
.breadcrumbs {
  color: var(--muted);
}

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

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

.movie-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #dbeafe;
}

.movie-cover.wide {
  aspect-ratio: 16 / 10;
}

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

.movie-card:hover .movie-cover img,
.related-card:hover img {
  transform: scale(1.08);
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.74), transparent 58%);
}

.cover-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  color: #ffffff;
  background: #dc2626;
  border-radius: 10px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.cover-title {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}

.movie-text {
  padding: 16px;
}

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

.movie-text p {
  margin: 0 0 12px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
}

.search-panel {
  padding: 22px;
  margin-bottom: 28px;
}

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

.search-field {
  width: 100%;
  height: 50px;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 0 16px;
  outline: 0;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-field:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  border: 1px solid #d1d5db;
  color: #374151;
  background: #ffffff;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.page-hero {
  padding: 62px 0 46px;
  background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 58%, #f0fdfa 100%);
}

.page-hero p {
  max-width: 780px;
  color: #4b5563;
  font-size: 18px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 74px 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #ffffff;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-thumb {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: #dbeafe;
}

.rank-row h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.rank-row p {
  margin: 0;
}

.detail-hero {
  padding: 44px 0 30px;
  background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 58%, #f0fdfa 100%);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 14px;
}

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

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

.player-card {
  overflow: hidden;
  border-radius: 26px;
  background: #0f172a;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

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

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

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.22));
}

.player-layer.hidden {
  display: none;
}

.play-ring {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 36px rgba(6, 182, 212, 0.36);
  font-size: 34px;
}

.player-title {
  padding: 18px 20px;
  color: #ffffff;
}

.player-title h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4.6vw, 44px);
  line-height: 1.12;
}

.player-title p {
  margin: 0;
  color: #cbd5e1;
}

.poster-side {
  border-radius: 26px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.poster-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #dbeafe;
}

.poster-info {
  padding: 20px;
}

.detail-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.detail-meta dt {
  color: #64748b;
}

.detail-meta dd {
  margin: 0;
  color: #111827;
  font-weight: 700;
  text-align: right;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.info-card {
  padding: 26px;
}

.info-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.info-card p {
  margin: 0;
  color: #374151;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  color: var(--cyan-dark);
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  font-size: 13px;
}

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

.related-card {
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.related-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #dbeafe;
  transition: transform 0.45s ease;
}

.related-card strong {
  display: block;
  padding: 12px;
  font-size: 15px;
  line-height: 1.3;
}

.site-footer {
  margin-top: 80px;
  padding: 42px 0;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  border-top: 1px solid #e5e7eb;
}

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

.footer-grid h3 {
  margin: 0 0 12px;
}

.footer-grid p,
.footer-grid a {
  color: #6b7280;
}

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

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

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--cyan);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover {
  transform: translateY(-3px);
}

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

.empty-result.show {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .poster-side {
    max-width: 420px;
  }

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

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }

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

  .hero {
    min-height: auto;
    padding-top: 38px;
  }

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

  .hero-poster,
  .hero-poster img {
    min-height: 360px;
  }

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

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

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

  .rank-row .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .rank-thumb {
    width: 72px;
  }

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

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

  .navbar {
    height: 64px;
  }

  .logo {
    font-size: 20px;
  }

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

  .hero-actions,
  .search-row {
    grid-template-columns: 1fr;
    display: grid;
  }

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

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

  .rank-thumb {
    display: none;
  }

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