:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --primary: #2563eb;
  --cyan: #06b6d4;
  --dark: #0f172a;
  --dark-2: #1e3a8a;
  --radius: 1.25rem;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f8fafc 100%);
}

img {
  max-width: 100%;
  height: auto;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, #0f172a, #1e3a8a, #0f172a);
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 10px 22px rgba(6, 182, 212, 0.3);
}

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

.nav-link {
  padding: 10px 15px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  padding: 9px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: #fff;
  border-radius: 2px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.35), transparent 34%), linear-gradient(135deg, #0f172a 0%, #1e3a8a 52%, #111827 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-slide {
  display: none;
  min-height: 680px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-slide.active {
  display: flex;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 42px;
  padding: 70px 0 92px;
}

.hero-copy {
  animation: fadeUp 0.5s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a5f3fc;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.2rem, 7vw, 5.2rem);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero h1 span {
  background: linear-gradient(90deg, #dbeafe, #a5f3fc, #f0fdfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 720px;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.9;
  margin: 0 0 26px;
}

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

.hero-tags span,
.tag-row em,
.meta-pill,
.breadcrumb a,
.breadcrumb span {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.88rem;
  font-style: normal;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  border: 0;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.34);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.hero-visual {
  position: relative;
  min-height: 470px;
}

.hero-poster {
  position: absolute;
  inset: 0 8% 0 10%;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.3), rgba(15, 23, 42, 0.3));
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.76), transparent 48%);
}

.hero-small-card {
  position: absolute;
  left: 0;
  bottom: 28px;
  width: min(320px, 78%);
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.32);
}

.hero-small-card strong,
.hero-small-card span {
  display: block;
}

.hero-small-card strong {
  font-size: 1.05rem;
  margin-bottom: 7px;
}

.hero-small-card span {
  color: #dbeafe;
  font-size: 0.92rem;
  line-height: 1.6;
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.65;
}

.hero-dot.active {
  width: 34px;
  background: #22d3ee;
  opacity: 1;
}

.section {
  padding: 64px 0;
}

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

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

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

.section-head.center {
  justify-content: center;
  text-align: center;
}

.section-title {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.04em;
}

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

.section-dark .section-subtitle {
  color: #bfdbfe;
}

.feature-grid,
.category-grid,
.movie-grid,
.rank-grid,
.related-grid {
  display: grid;
  gap: 22px;
}

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

.feature-card,
.category-card,
.movie-card,
.search-panel,
.info-panel,
.detail-panel,
.review-panel,
.side-panel {
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.feature-card {
  padding: 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  margin-bottom: 16px;
  font-size: 1.4rem;
}

.feature-card h2,
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  font-weight: 900;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.category-card a,
.movie-card a {
  display: block;
  height: 100%;
}

.category-covers {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: 92px 92px;
  gap: 4px;
  overflow: hidden;
  background: #dbeafe;
}

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

.category-covers img:first-child {
  grid-row: span 2;
}

.category-info {
  display: block;
  padding: 20px;
}

.category-info strong,
.category-info span,
.card-body strong,
.card-body span {
  display: block;
}

.category-info strong {
  font-size: 1.2rem;
  font-weight: 950;
  margin-bottom: 8px;
}

.category-info span {
  color: var(--muted);
  line-height: 1.7;
}

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

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

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

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

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

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 52%);
}

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 9px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.26);
}

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

.card-body {
  display: block;
  padding: 14px;
}

.card-body strong {
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 8px;
}

.card-line {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.card-meta {
  margin-top: 9px;
  color: #2563eb;
  font-weight: 800;
  font-size: 0.82rem;
}

.movie-card-wide a {
  display: grid;
  grid-template-columns: 44% 56%;
}

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

.movie-card-wide .card-body strong {
  font-size: 1.1rem;
}

.tag-row {
  margin-top: 12px;
}

.tag-row em,
.meta-pill,
.breadcrumb a,
.breadcrumb span {
  background: #f1f5f9;
  color: #475569;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 116px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(135deg, #f97316, #facc15);
}

.rank-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #1e293b;
}

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

.rank-content strong,
.rank-content span {
  display: block;
}

.rank-content strong {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.rank-content span {
  color: #bfdbfe;
  line-height: 1.55;
}

.page-hero {
  color: #fff;
  background: radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.3), transparent 32%), linear-gradient(135deg, #0f172a, #1e3a8a, #111827);
  padding: 70px 0;
}

.page-hero h1 {
  max-width: 860px;
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 1.12rem;
  line-height: 1.9;
}

.search-panel,
.info-panel {
  padding: 22px;
  margin: 28px 0;
}

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

.search-box input,
.search-box select,
.filter-row select,
.category-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 15px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.search-box input:focus,
.search-box select:focus,
.filter-row select:focus,
.category-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-row {
  margin-top: 14px;
}

.filter-row select {
  width: min(220px, 100%);
}

.category-search {
  margin: 26px 0 30px;
}

.category-search input {
  max-width: 520px;
}

.detail-hero {
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e3a8a, #111827);
  padding: 34px 0;
}

.breadcrumb {
  margin-bottom: 24px;
}

.breadcrumb a,
.breadcrumb span {
  color: #e0f2fe;
  background: rgba(255,255,255,0.12);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 36px 0 70px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.28));
}

.player-start.is-hidden {
  display: none;
}

.player-start span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 950;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.35);
}

.detail-panel,
.review-panel,
.side-panel {
  padding: 26px;
  margin-top: 22px;
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-panel h2,
.review-panel h2,
.side-panel h2,
.info-panel h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  font-weight: 950;
}

.detail-panel p,
.review-panel p,
.info-panel p {
  color: #475569;
  line-height: 1.95;
  margin: 0 0 14px;
}

.meta-list {
  margin: 16px 0 22px;
}

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

.related-card a {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.related-card a:hover {
  background: #f8fafc;
}

.related-card img {
  width: 110px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: #dbeafe;
}

.related-card strong,
.related-card span {
  display: block;
}

.related-card strong {
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 6px;
}

.related-card span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.site-footer {
  color: #dbeafe;
  background: #0f172a;
  padding: 48px 0 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #fff;
  margin-bottom: 12px;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.site-footer h2 {
  color: #fff;
  margin: 0 0 14px;
  font-size: 1.05rem;
}

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

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 18px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.hidden-card {
  display: none !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

@media (max-width: 820px) {
  .mobile-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: #111827;
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    border-radius: 12px;
  }

  .hero,
  .hero-slide {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    padding: 48px 0 100px;
  }

  .hero-visual {
    min-height: 390px;
  }

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

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

  .rank-grid,
  .category-grid,
  .feature-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-wide a,
  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-poster {
    width: 100%;
  }

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

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

  .brand {
    font-size: 1.08rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero-actions,
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .filter-row select {
    width: 100%;
  }

  .hero-visual {
    min-height: 320px;
  }

  .hero-poster {
    inset: 0 0 0 5%;
  }

  .movie-grid,
  .movie-grid.featured {
    gap: 14px;
  }

  .card-body {
    padding: 11px;
  }

  .related-card a {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .related-card img {
    width: 88px;
  }
}
