:root {
  --blue: #2563eb;
  --blue-dark: #1e3a8a;
  --cyan: #06b6d4;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 45%, #ecfeff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.brand-text {
  font-size: 26px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-link {
  color: #334155;
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
  transform: translateY(-1px);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid #cbd5e1;
  background: white;
  border-radius: 999px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 11px 16px;
}

.header-search button,
.mobile-search button,
.filter-panel button,
.hero-button,
.section-link,
.player-link {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button {
  padding: 11px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.hero-button:hover,
.section-link:hover,
.player-link:hover,
.header-search button:hover,
.mobile-search button:hover,
.filter-panel button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(37, 99, 235, 0.28);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  padding: 8px;
  margin-left: auto;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: #0f172a;
  display: block;
  border-radius: 4px;
}

.mobile-nav {
  display: none;
  padding: 0 24px 20px;
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #334155;
  font-weight: 700;
}

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

.hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  color: white;
  background: linear-gradient(120deg, #172554 0%, #1d4ed8 45%, #0891b2 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.58) 45%, rgba(15, 23, 42, 0.08) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

.hero-text {
  max-width: 690px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  font-weight: 800;
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.28);
}

.hero h1 {
  margin: 22px 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: clamp(18px, 2vw, 23px);
}

.hero-facts,
.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 30px;
}

.hero-facts span,
.detail-facts span,
.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  font-weight: 700;
  font-size: 13px;
  backdrop-filter: blur(10px);
}

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

.hero-button {
  padding: 15px 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-ghost {
  display: inline-flex;
  align-items: center;
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-weight: 800;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dots button.is-active {
  width: 34px;
  background: white;
}

.main-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 62px 24px 24px;
}

.page-hero-card {
  padding: clamp(28px, 5vw, 56px);
  border-radius: 32px;
  color: white;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 52%, #06b6d4 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.page-hero-card::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  right: -110px;
  top: -120px;
  background: rgba(255, 255, 255, 0.18);
}

.page-hero h1,
.page-hero-card h1 {
  position: relative;
  z-index: 2;
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 56px);
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.page-hero p,
.page-hero-card p {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

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

.section-head h2,
.section-head h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  padding: 12px 20px;
  white-space: nowrap;
}

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

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

.movie-card {
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-card-large .card-media {
  aspect-ratio: 16 / 10;
}

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

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

.card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0));
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(37, 99, 235, 0.9);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  top: 14px;
  bottom: auto;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-body h2 {
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  color: var(--blue);
  background: #eff6ff;
}

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

.category-tile {
  position: relative;
  min-height: 260px;
  border-radius: 28px;
  overflow: hidden;
  color: white;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.tile-covers {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  opacity: 0.7;
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.25));
}

.tile-content {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
}

.tile-content h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.tile-content p {
  margin: 0 0 16px;
  color: #e2e8f0;
}

.tile-content span {
  font-weight: 900;
}

.feature-band {
  margin: 56px 0;
  padding: clamp(26px, 4vw, 46px);
  border-radius: 32px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: var(--shadow);
}

.feature-band .section-head p {
  color: rgba(255, 255, 255, 0.84);
}

.feature-band .movie-card {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  backdrop-filter: blur(14px);
  box-shadow: none;
}

.feature-band .card-meta,
.feature-band .card-body p {
  color: rgba(255, 255, 255, 0.78);
}

.feature-band .tag-row span {
  color: white;
  background: rgba(255, 255, 255, 0.18);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 54px 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.rank-number {
  color: var(--blue);
  font-size: 24px;
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: #dbeafe;
}

.rank-title {
  font-weight: 850;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-type {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 140px;
  gap: 12px;
  margin: 0 0 28px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 13px 16px;
}

.filter-panel button {
  padding: 13px 18px;
}

.no-results {
  display: none;
  padding: 28px;
  border-radius: 22px;
  background: white;
  color: var(--muted);
  text-align: center;
}

.no-results.is-visible {
  display: block;
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 700;
}

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.detail-hero {
  padding: clamp(26px, 4vw, 46px);
  border-radius: 32px;
  color: white;
  background: linear-gradient(135deg, #111827, #1e3a8a 54%, #0e7490);
  box-shadow: var(--shadow);
}

.detail-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.detail-hero p {
  color: #dbeafe;
  font-size: 18px;
  margin: 0 0 22px;
}

.player-card {
  margin-top: 24px;
  border-radius: 28px;
  overflow: hidden;
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18));
}

.player-button {
  position: relative;
  z-index: 3;
  width: 96px;
  height: 96px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 28px 60px rgba(37, 99, 235, 0.36);
  font-size: 32px;
  cursor: pointer;
}

.player-box.is-playing .player-cover {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.detail-section {
  margin-top: 24px;
  padding: 28px;
  border-radius: 28px;
  background: white;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.detail-section h2 {
  margin: 0 0 14px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.detail-section p {
  color: #334155;
  margin: 0 0 16px;
}

.detail-side .movie-card {
  margin-bottom: 18px;
}

.side-title {
  margin: 0 0 18px;
  font-size: 24px;
}

.pagination-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.pagination-links a {
  flex: 1;
  padding: 16px 18px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  color: var(--blue);
  font-weight: 900;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  margin-top: 48px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  color: white;
  font-size: 22px;
}

.footer-grid p {
  max-width: 420px;
  color: #94a3b8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 18px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 68px;
    padding: 0 18px;
  }

  .brand-text {
    font-size: 22px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .rank-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    display: block;
  }

  .section-link {
    margin-top: 14px;
    display: inline-flex;
  }

  .rank-item {
    grid-template-columns: 42px 54px 1fr;
  }

  .rank-type {
    display: none;
  }

  .page-hero,
  .main-wrap,
  .breadcrumb,
  .detail-layout {
    padding-left: 18px;
    padding-right: 18px;
  }
}
