:root {
  --bg: #f8fafc;
  --bg-soft: #eef6ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #ffffff;
  --slate: #0f172a;
  --slate-2: #1e293b;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --pink: #ec4899;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #ffffff;
  box-shadow: 0 12px 35px rgba(2, 6, 23, 0.32);
}

.nav-inner {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.logo-text {
  white-space: nowrap;
  font-size: 20px;
}

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

.nav-link {
  padding: 8px 12px;
  border-radius: 12px;
  color: #e2e8f0;
  font-size: 14px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(148, 163, 184, 0.18);
  color: #ffffff;
  transform: translateY(-1px);
}

.header-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select,
.search-box input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  padding: 10px 44px 10px 18px;
  transition: box-shadow 0.25s ease, border 0.25s ease, background 0.25s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-box input:focus {
  border-color: rgba(6, 182, 212, 0.9);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
}

.header-search {
  width: 250px;
}

.header-search button,
.mobile-search button,
.search-box button {
  position: absolute;
  right: 5px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.18);
  color: #ffffff;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: #1e293b;
  padding: 14px 16px 18px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mobile-panel nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.38);
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
  color: #ffffff;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
  pointer-events: none;
}

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

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

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 48%, rgba(2, 6, 23, 0.16) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.12) 45%, rgba(2, 6, 23, 0.54) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 72px 0 86px;
}

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

.hero-badge,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(6, 182, 212, 0.28);
}

.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-desc {
  max-width: 660px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(17px, 2.1vw, 22px);
}

.hero-meta,
.movie-meta,
.detail-meta,
.horizontal-top,
.tag-row,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

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

.btn,
.btn-secondary,
.section-more,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.26);
}

.btn-secondary {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

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

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 38px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 58px;
  background: #22d3ee;
}

.section {
  padding: 72px 0;
}

.section-dark {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
}

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

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

.section-heading h2,
.page-title,
.detail-title {
  margin: 12px 0 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-lead {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 660px;
}

.section-dark .section-heading p,
.section-dark .page-lead {
  color: #cbd5e1;
}

.section-more {
  flex: 0 0 auto;
  padding: 10px 18px;
  color: var(--blue);
  background: #e0f2fe;
}

.stats-grid,
.category-grid,
.movie-grid,
.rank-grid,
.related-grid {
  display: grid;
  gap: 20px;
}

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

.stat-card,
.category-card,
.info-panel,
.player-panel,
.review-panel,
.search-panel {
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 24px;
  color: var(--text);
}

.stat-card strong {
  display: block;
  font-size: 26px;
  color: var(--blue);
}

.stat-card span {
  color: var(--muted);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  min-height: 190px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -48px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(37, 99, 235, 0.2));
}

.category-card:hover,
.movie-card:hover,
.horizontal-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 16px 0 8px;
  font-size: 22px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.movie-poster img,
.horizontal-thumb img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 12px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #ec4899);
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.25);
}

.movie-body {
  padding: 16px;
}

.movie-meta span {
  color: #475569;
  background: #f1f5f9;
}

.movie-body h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.28;
}

.movie-body p {
  margin: 0;
  min-height: 50px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  color: #0369a1;
  background: #e0f2fe;
}

.horizontal-list {
  display: grid;
  gap: 16px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.horizontal-thumb {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  background: #0f172a;
}

.horizontal-body h3 {
  margin: 10px 0 8px;
  font-size: 20px;
}

.horizontal-body p {
  margin: 0 0 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.horizontal-top strong {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ec4899);
}

.text-link {
  color: var(--blue);
  font-weight: 800;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 54%, #0e7490 100%);
  color: #ffffff;
}

.page-hero {
  padding: 76px 0 68px;
}

.page-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.24), transparent 30%), radial-gradient(circle at 86% 16%, rgba(236, 72, 153, 0.18), transparent 28%);
}

.page-hero .container,
.detail-hero .container {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #ffffff;
}

.filter-panel,
.search-box {
  display: grid;
  grid-template-columns: 1fr 180px 160px 160px;
  gap: 12px;
  margin: 0 0 28px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select,
.search-box input {
  background: #f8fafc;
  color: var(--text);
  border-color: #e2e8f0;
}

.filter-panel button,
.search-box button {
  position: static;
  width: auto;
  height: auto;
  border-radius: 999px;
  padding: 10px 18px;
  border: 0;
  cursor: pointer;
}

.detail-hero {
  padding: 56px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.42);
}

.detail-title {
  margin-top: 18px;
  font-size: clamp(36px, 5.2vw, 64px);
}

.detail-desc {
  margin: 18px 0 20px;
  max-width: 760px;
  color: #e2e8f0;
  font-size: 19px;
}

.detail-meta span {
  background: rgba(255, 255, 255, 0.14);
}

.player-panel {
  padding: 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.24);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 48%, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.46));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-launch {
  width: 96px;
  height: 96px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 20px 46px rgba(37, 99, 235, 0.34);
}

.player-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 16px;
}

.player-title h2 {
  margin: 0;
  font-size: 26px;
}

.player-state {
  min-height: 24px;
  margin-top: 12px;
  color: var(--muted);
}

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

.info-panel,
.review-panel,
.search-panel {
  padding: 26px;
}

.info-panel h2,
.review-panel h2,
.search-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.info-panel p,
.review-panel p,
.search-panel p {
  margin: 0 0 14px;
  color: #475569;
}

.info-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.info-list span {
  color: var(--muted);
}

.search-results-note {
  color: var(--muted);
  margin: -12px 0 24px;
}

.no-result {
  padding: 32px;
  border-radius: 24px;
  background: #ffffff;
  color: var(--muted);
  box-shadow: var(--shadow);
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 44px 0;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.footer-links {
  display: flex;
  gap: 16px;
}

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

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

  .header-search {
    margin-left: auto;
  }

  .menu-toggle {
    display: block;
  }

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

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

@media (max-width: 820px) {
  .header-search {
    display: none;
  }

  .hero,
  .hero-inner {
    min-height: 620px;
  }

  .section-heading,
  .footer-inner,
  .player-title {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .filter-panel,
  .search-box,
  .info-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 260px;
  }
}

@media (max-width: 560px) {
  .nav-inner,
  .container,
  .footer-inner,
  .hero-inner {
    width: min(100% - 24px, 1180px);
  }

  .logo-text {
    font-size: 17px;
  }

  .hero-actions,
  .footer-links {
    flex-direction: column;
    width: 100%;
  }

  .btn,
  .btn-secondary,
  .section-more {
    width: 100%;
  }

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

  .horizontal-card {
    grid-template-columns: 100px 1fr;
  }

  .section {
    padding: 52px 0;
  }

  .page-hero {
    padding: 56px 0;
  }
}
