:root {
  --bg: #f8fafc;
  --text: #172033;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.24);
  --card: #ffffff;
  --teal: #14b8a6;
  --blue: #2563eb;
  --sky: #0ea5e9;
  --dark: #111827;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.26);
}

.brand-copy {
  display: grid;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 21px;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #0f766e, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

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

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #0f766e;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.10), rgba(37, 99, 235, 0.10));
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(37, 99, 235, 0.14));
  color: #0f766e;
}

.main-wrap,
.page-wrap {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #0f172a;
  color: #fff;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.05);
  transition: transform 7s ease;
}

.hero-slide.is-active .hero-bg {
  transform: scale(1.0);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 24%, rgba(20, 184, 166, 0.35), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.64) 47%, rgba(15, 23, 42, 0.35)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.86), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 48px;
  padding: 88px 0 108px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero-kicker {
  margin: 0 0 10px;
  font-size: clamp(36px, 7vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.08em;
  font-weight: 900;
  text-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(28px, 4.4vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.chip-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-meta span,
.detail-meta span,
.chip,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(240, 253, 250, 0.95);
  font-size: 13px;
  font-weight: 800;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.30);
}

.btn-secondary {
  color: #0f766e;
  background: #fff;
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(12px);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.20);
}

.hero-card {
  align-self: stretch;
  display: grid;
  align-content: end;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  min-height: 480px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.24), rgba(37, 99, 235, 0.24));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

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

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

.hero-stats {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-weight: 800;
}

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

.hero-dot {
  width: 42px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #fff;
}

.section {
  padding: 54px 0;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, #0f766e, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head p {
  max-width: 620px;
  margin: 9px 0 0;
  color: var(--muted);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin: 24px 0 30px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
}

.search-input {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  outline: 0;
  color: var(--text);
  background: #fff;
}

.search-input:focus {
  border-color: rgba(20, 184, 166, 0.68);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.filter-select {
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  color: #334155;
  background: #fff;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.95), rgba(37, 99, 235, 0.92));
  color: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -50px;
  top: -50px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 900;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: var(--shadow);
}

.card-image {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(37, 99, 235, 0.16));
}

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

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

.card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.46), transparent 50%);
}

.card-rating,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.20);
}

.card-rating {
  right: 12px;
  top: 12px;
}

.rank-badge {
  left: 12px;
  top: 12px;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.card-body strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.28;
  font-weight: 900;
}

.card-body em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.card-desc {
  color: #475569;
  font-size: 14px;
}

.tag-row span {
  color: #0f766e;
  background: #f0fdfa;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 74px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--soft-shadow);
}

.rank-number {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-weight: 900;
}

.rank-item img {
  width: 74px;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-copy {
  display: grid;
  gap: 4px;
}

.rank-copy strong {
  color: #0f172a;
  font-weight: 900;
}

.rank-copy em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-item b {
  color: #f97316;
  font-size: 18px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0;
  color: #fff;
  background:
    radial-gradient(circle at 74% 20%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #14b8a6, #2563eb 58%, #1d4ed8);
}

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

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 28px 0;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #0f766e;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  align-items: stretch;
  padding: 28px;
  border-radius: 32px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--soft-shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(37, 99, 235, 0.16));
}

.detail-cover img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.detail-copy {
  display: grid;
  align-content: center;
  gap: 18px;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.detail-copy p {
  margin: 0;
  color: #475569;
  font-size: 18px;
}

.player-section {
  margin-top: 36px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at 50% 45%, rgba(20, 184, 166, 0.28), transparent 28%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.28));
  text-align: center;
  cursor: pointer;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  margin: 0 auto;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.38);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 22px;
  font-weight: 900;
}

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

.content-panel {
  margin-top: 36px;
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--soft-shadow);
}

.content-panel h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 26px;
  font-weight: 900;
}

.content-panel p {
  margin: 0 0 24px;
  color: #334155;
  font-size: 17px;
}

.empty-state {
  display: none;
  padding: 34px;
  border: 1px dashed rgba(148, 163, 184, 0.42);
  border-radius: 24px;
  color: #64748b;
  text-align: center;
  background: #fff;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 80px;
  padding: 54px 0 28px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 38px;
}

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

.site-footer p {
  max-width: 430px;
  color: #94a3b8;
}

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

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

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

.footer-links a {
  color: #cbd5e1;
  transition: color 0.25s ease;
}

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

.footer-bottom {
  width: min(1220px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.20);
  color: #94a3b8;
  font-size: 14px;
}

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

  .hero-card {
    display: none;
  }

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

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

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

  .nav-menu {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 80px;
    display: none;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }

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

  .nav-link {
    justify-content: center;
  }

  .hero-carousel,
  .hero-content {
    min-height: 600px;
  }

  .hero-content {
    padding-top: 70px;
    padding-bottom: 92px;
  }

  .hero-kicker {
    font-size: 42px;
  }

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

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

  .detail-hero {
    padding: 18px;
  }

  .detail-cover img {
    min-height: 340px;
  }
}

@media (max-width: 560px) {
  .site-header-inner,
  .main-wrap,
  .page-wrap,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1220px);
  }

  .brand-copy small {
    display: none;
  }

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

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

  .btn-primary,
  .btn-secondary,
  .btn-ghost {
    width: 100%;
  }

  .section {
    padding: 38px 0;
  }

  .section-head {
    display: grid;
  }

  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 38px 60px 1fr;
  }

  .rank-item b {
    grid-column: 3;
    justify-self: start;
  }

  .rank-item img {
    width: 60px;
    height: 76px;
  }

  .content-panel {
    padding: 22px;
  }
}
