* {
  box-sizing: border-box;
}

:root {
  --cyan: #06b6d4;
  --blue: #3b82f6;
  --teal: #14b8a6;
  --dark: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--dark);
  background: var(--white);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

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

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.main-nav a,
.mobile-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #374151;
  font-weight: 600;
  transition: color 0.25s ease, background 0.25s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: #0891b2;
  background: #ecfeff;
}

.mobile-menu-btn {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  background: #f3f4f6;
  font-size: 20px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

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

.hero-pattern,
.page-hero::before,
.detail-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: stretch;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 45% 55%;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

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

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

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.82)),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.34), transparent 38%);
}

.hero-copy h1 {
  margin: 14px 0 10px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3vw, 40px);
}

.hero-copy p {
  margin: 0 0 28px;
  max-width: 720px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 13px;
  color: #0e7490;
  background: #cffafe;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-copy .eyebrow {
  color: #cffafe;
  background: rgba(14, 116, 144, 0.55);
}

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

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.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: #0f172a;
  background: #ffffff;
  border: 2px solid #d1d5db;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

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

.hero-dots button.is-active {
  width: 28px;
  background: #ffffff;
}

.hero-side {
  display: grid;
  gap: 18px;
}

.stat-card,
.hero-search,
.filter-panel,
.content-panel,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.stat-card {
  display: grid;
  place-items: center;
  padding: 30px;
}

.stat-card strong {
  font-size: 46px;
  color: #0891b2;
}

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

.hero-search {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.hero-search input,
.hero-search button,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 0 14px;
  font: inherit;
}

.hero-search button {
  border: 0;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  cursor: pointer;
}

.section-block {
  padding: 72px 0;
}

.soft-bg {
  background: linear-gradient(180deg, #ffffff, #f9fafb);
}

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

.section-head h2,
.category-overview-head h2,
.content-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
}

.section-head p,
.category-overview-head p,
.content-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-head > a {
  color: #0891b2;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.year-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  top: 12px;
  right: 12px;
  background: #dc2626;
}

.play-badge {
  left: 12px;
  bottom: 12px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

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

.movie-title {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-title:hover {
  color: #0891b2;
}

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

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

.meta-line {
  margin-bottom: 12px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.meta-line span,
.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #f3f4f6;
}

.tag-row span {
  color: #0e7490;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 700;
}

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

.category-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.category-pill span {
  font-weight: 900;
}

.category-pill em {
  color: #0891b2;
  font-style: normal;
  font-weight: 800;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0;
  background: linear-gradient(135deg, #ecfeff, #eff6ff 60%, #f0fdfa);
}

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

.page-hero h1 {
  max-width: 900px;
  margin: 16px 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  margin-bottom: 22px;
  padding: 18px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #374151;
  font-size: 14px;
  font-weight: 800;
}

.result-count {
  min-height: 24px;
  margin-bottom: 20px;
  color: #6b7280;
  font-weight: 700;
}

.category-overview-list {
  display: grid;
  gap: 28px;
  padding: 56px 0;
}

.category-overview-card {
  padding: 28px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 82px minmax(0, 1fr) 90px;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

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

.rank-poster {
  display: block;
  overflow: hidden;
  width: 82px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: linear-gradient(135deg, #e0f2fe, #ecfeff);
}

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

.rank-info a {
  display: block;
  margin-bottom: 5px;
  font-size: 18px;
  font-weight: 900;
}

.rank-info p {
  margin: 0 0 6px;
  color: var(--muted);
  line-height: 1.6;
}

.rank-info span {
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.rank-row > strong {
  color: #0891b2;
  font-size: 22px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  color: #ffffff;
  background: #0f172a;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0.28;
  filter: blur(12px) saturate(1.2);
  transform: scale(1.05);
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-copy h1 {
  margin: 18px 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.06;
}

.one-line {
  max-width: 900px;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.8;
}

.detail-tags {
  margin: 22px 0;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 12px;
  place-items: center;
  align-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-overlay span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  color: #0891b2;
  background: #ffffff;
  font-size: 32px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
}

.player-overlay strong {
  font-size: 20px;
}

.player-shell.is-ready .player-overlay {
  display: none;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.content-panel {
  padding: 30px;
}

.prev-next {
  justify-content: space-between;
  margin-top: 28px;
}

.prev-next a {
  max-width: 48%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  color: #0891b2;
  background: #ffffff;
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}

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

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

.footer-grid a,
.footer-grid p {
  display: block;
  margin: 0 0 10px;
  color: #4b5563;
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .hero-container,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .mobile-menu-btn {
    display: inline-flex;
  }

  .hero-section,
  .section-block,
  .page-hero,
  .detail-hero {
    padding: 42px 0;
  }

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

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

  .hero-copy {
    padding: 28px;
  }

  .hero-side,
  .movie-grid,
  .small-grid,
  .category-grid,
  .filter-panel,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .category-overview-head {
    display: block;
  }

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

  .rank-row > strong {
    grid-column: 3;
  }

  .prev-next a {
    max-width: 100%;
  }
}
