:root {
  color-scheme: light;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --teal: #0d9488;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --amber: #f59e0b;
  --white: #ffffff;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow-card: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 14px 30px rgba(37, 99, 235, 0.14);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--slate-50) 0%, var(--white) 42%, var(--slate-50) 100%);
  color: var(--slate-900);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: var(--max-width);
  min-height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: var(--white);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.25);
}

.brand-text {
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 13px;
  color: var(--slate-700);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
  background: #eff6ff;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 300px;
}

.header-search input,
.search-panel input {
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 12px 15px;
  outline: none;
  background: var(--white);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button,
.search-panel button {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: none;
  background: var(--slate-100);
  color: var(--slate-800);
  border-radius: 12px;
  padding: 9px 12px;
}

.content-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(120deg, #2563eb 0%, #0891b2 50%, #0f766e 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% -10%;
  height: 360px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 65%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px), radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px);
  background-size: 42px 42px, 64px 64px;
  opacity: 0.7;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  min-height: 640px;
  margin: 0 auto;
  padding: 86px 20px 140px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 54px;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #e0f2fe;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 7vw, 66px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.08em;
}

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

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: var(--white);
  color: var(--blue);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.22);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-links a {
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #ecfeff;
  font-weight: 700;
}

.hero-focus {
  position: relative;
  height: 455px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 34px 70px rgba(15, 23, 42, 0.34);
  transform: rotate(2deg);
  background: rgba(15, 23, 42, 0.18);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 36%, rgba(2, 6, 23, 0.85));
}

.hero-slide span {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

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

.overlap-section {
  margin-top: -86px;
  position: relative;
  z-index: 3;
}

.content-section {
  padding: 58px 0;
}

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

.warm-section {
  background: linear-gradient(90deg, #fffbeb, #fff7ed);
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.section-more {
  color: var(--blue);
  font-weight: 800;
}

.movie-grid,
.grid-three,
.horizontal-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 12px 26px 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);
}

.card-link {
  display: block;
  height: 100%;
}

.card-poster {
  position: relative;
  height: 255px;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.card-poster img {
  transition: transform 0.35s ease;
}

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

.large-poster {
  height: 330px;
}

.card-badge,
.card-duration {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  top: 14px;
  left: 14px;
  background: var(--blue);
  color: var(--white);
}

.card-duration {
  right: 12px;
  bottom: 12px;
  background: rgba(2, 6, 23, 0.78);
  color: var(--white);
}

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 40px;
  opacity: 0;
  background: rgba(2, 6, 23, 0.35);
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-500);
  font-size: 13px;
}

.card-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--slate-100);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #eff6ff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.movie-card-horizontal .horizontal-link {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 0;
}

.horizontal-poster {
  height: 100%;
  min-height: 150px;
}

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--slate-900);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-card);
}

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

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.72;
}

.category-tile strong,
.category-tile small,
.category-orb {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  margin-bottom: 6px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.category-orb {
  width: 44px;
  height: 44px;
  margin-bottom: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.3);
}

.page-hero {
  color: var(--white);
  background: linear-gradient(120deg, #2563eb, #0891b2, #0f766e);
}

.small-hero {
  padding: 72px 0;
}

.small-hero h1 {
  font-size: clamp(34px, 6vw, 54px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 750;
}

.breadcrumb a:hover {
  color: var(--white);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-chip {
  border: none;
  border-radius: 999px;
  padding: 10px 15px;
  background: var(--white);
  color: var(--slate-700);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
  color: var(--white);
  background: var(--blue);
}

.search-panel {
  max-width: 720px;
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.empty-state {
  margin-top: 24px;
  padding: 40px;
  border-radius: var(--radius-md);
  background: var(--white);
  text-align: center;
  color: var(--slate-500);
  font-size: 18px;
  font-weight: 750;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 62px 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.ranking-rank {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
}

.ranking-thumb {
  height: 112px;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
}

.ranking-info p {
  margin: 0 0 10px;
  color: var(--slate-600);
}

.ranking-score {
  color: var(--amber);
  font-size: 26px;
}

.detail-top {
  padding: 36px 0 58px;
  color: var(--white);
  background: linear-gradient(120deg, #0f172a 0%, #1d4ed8 56%, #0891b2 100%);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 26px;
  align-items: stretch;
}

.player-shell,
.detail-panel,
.detail-text,
.detail-side-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 26px 56px rgba(2, 6, 23, 0.24);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--slate-950);
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--slate-950);
  object-fit: contain;
  cursor: pointer;
}

.player-cover-button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: grid;
  place-items: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.72));
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover-button span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.38);
  font-size: 34px;
}

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

.player-box.is-hidden .player-cover-button {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-panel {
  padding: 28px;
  background: rgba(255, 255, 255, 0.12);
}

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

.detail-one-line {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.detail-copy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.detail-text,
.detail-side-card {
  padding: 28px;
  background: var(--white);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.detail-text h2,
.detail-side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.detail-text p {
  margin: 0 0 26px;
  color: var(--slate-700);
  font-size: 17px;
}

.detail-side-card {
  display: grid;
  gap: 12px;
}

.detail-side-card a {
  border-radius: 14px;
  padding: 12px 14px;
  background: #eff6ff;
  color: var(--blue-dark);
  font-weight: 850;
}

.site-footer {
  background: var(--slate-900);
  color: #cbd5e1;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
  gap: 34px;
}

.footer-logo .brand-text {
  color: var(--white);
  background: none;
  -webkit-text-fill-color: var(--white);
}

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
  color: #94a3b8;
}

.footer-column h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 17px;
  font-weight: 900;
}

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

.footer-column a:hover {
  color: #38bdf8;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 20px;
  text-align: center;
  color: #94a3b8;
}

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

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

  .hero-inner,
  .detail-layout,
  .detail-copy-grid {
    grid-template-columns: 1fr;
  }

  .hero-focus {
    max-width: 420px;
    transform: none;
  }
}

@media (max-width: 760px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    order: 10;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

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

  .nav-link {
    width: 100%;
  }

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

  .hero-inner {
    padding: 58px 16px 120px;
  }

  .hero h1,
  .page-hero h1 {
    letter-spacing: -0.05em;
  }

  .hero p,
  .page-hero p {
    font-size: 17px;
  }

  .hero-focus {
    height: 360px;
  }

  .movie-grid,
  .grid-three,
  .horizontal-grid,
  .category-grid,
  .category-grid-wide {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal .horizontal-link,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .horizontal-poster,
  .ranking-thumb {
    height: 220px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .search-panel {
    flex-direction: column;
  }

  .detail-top {
    padding-top: 24px;
  }
}
