:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-accent: #f59e0b;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-soft: #f8fafc;
  --color-line: #e5e7eb;
  --color-card: #ffffff;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius-large: 28px;
  --radius-card: 18px;
  --site-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-text);
  background: linear-gradient(180deg, #f9fbff 0%, #ffffff 34%, #f7f9fd 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.site-logo__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--color-primary), #7c3aed);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.site-logo__text {
  background: linear-gradient(135deg, #0f172a, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  color: #374151;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--color-primary);
  background: #eff6ff;
  transform: translateY(-1px);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(320px, 32vw);
  flex: 0 1 auto;
}

.header-search input {
  width: 100%;
  height: 42px;
  padding: 0 88px 0 18px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: #f9fafb;
  color: #111827;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus {
  border-color: rgba(37, 99, 235, 0.55);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.header-search button {
  position: absolute;
  right: 4px;
  height: 34px;
  padding: 0 16px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  border-radius: 999px;
  background: var(--color-primary);
  font-weight: 800;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--color-primary);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(var(--site-width), calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--color-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

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

.mobile-panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
}

.mobile-panel a:hover {
  background: #eff6ff;
  color: var(--color-primary);
}

.site-main {
  min-height: 70vh;
}

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

.hero-carousel {
  width: min(1380px, calc(100% - 32px));
  margin: 26px auto 0;
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: #0f172a;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.22);
}

.hero-slide {
  display: none;
  min-height: 560px;
  position: relative;
  overflow: hidden;
}

.hero-slide.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 390px;
  gap: 42px;
  align-items: center;
  padding: 72px;
}

.hero-slide__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  filter: blur(3px) saturate(1.15);
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.50), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.66) 50%, rgba(15, 23, 42, 0.38));
}

.hero-copy,
.hero-poster-wrap {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 13px;
  color: #dbeafe;
  border: 1px solid rgba(219, 234, 254, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0;
  max-width: 760px;
  color: #ffffff;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 760px;
  margin: 22px 0 0;
  color: #d1d5db;
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0;
}

.hero-meta span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 14px;
  font-weight: 800;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), #7c3aed);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.32);
}

.btn-soft {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-light {
  color: var(--color-primary);
  background: #ffffff;
  border: 1px solid #dbeafe;
}

.hero-poster-wrap {
  justify-self: end;
}

.hero-poster {
  width: 320px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: 28px;
  bottom: 28px;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 22px;
}

.section {
  padding: 58px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--color-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.stat-card {
  padding: 22px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.stat-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-card);
  background: var(--color-card);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: var(--shadow-card);
}

.movie-card__poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #e0e7ff, #eff6ff);
}

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

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

.movie-card__badge,
.movie-card__type {
  position: absolute;
  z-index: 2;
  top: 10px;
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
}

.movie-card__badge {
  left: 10px;
}

.movie-card__type {
  right: 10px;
  background: rgba(37, 99, 235, 0.88);
}

.movie-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.88);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .movie-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card__body {
  padding: 14px;
}

.movie-card__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card__title a:hover {
  color: var(--color-primary);
}

.movie-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  color: var(--color-muted);
  font-size: 13px;
}

.movie-card__summary {
  margin: 0;
  color: #4b5563;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.movie-card__tag {
  padding: 3px 8px;
  color: var(--color-primary);
  border-radius: 999px;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -42px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(124, 58, 237, 0.18));
}

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

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

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

.category-count {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--color-primary);
  background: #eff6ff;
  font-weight: 900;
}

.page-hero {
  padding: 64px 0 38px;
  background:
    radial-gradient(circle at 90% 0%, rgba(37, 99, 235, 0.16), transparent 28%),
    radial-gradient(circle at 10% 10%, rgba(245, 158, 11, 0.13), transparent 28%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--color-muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--color-primary);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.7fr auto;
  gap: 12px;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid var(--color-line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--color-line);
  border-radius: 13px;
  background: #f9fafb;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.filter-panel button {
  height: 44px;
  padding: 0 18px;
  border: 0;
  color: #ffffff;
  border-radius: 13px;
  background: var(--color-primary);
  cursor: pointer;
  font-weight: 900;
}

.result-note {
  margin: 0 0 18px;
  color: var(--color-muted);
  font-weight: 700;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--color-line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.rank-number {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--color-primary), #7c3aed);
  font-size: 22px;
  font-weight: 950;
}

.rank-cover {
  width: 72px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #e0e7ff;
}

.rank-title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.rank-summary {
  margin: 6px 0 0;
  color: var(--color-muted);
}

.detail-hero {
  padding: 42px 0;
  background:
    radial-gradient(circle at 84% 12%, rgba(37, 99, 235, 0.18), transparent 32%),
    linear-gradient(135deg, #f8fafc, #ffffff);
}

.detail-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: #e0e7ff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

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

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 850;
}

.detail-one-line {
  margin: 0;
  max-width: 860px;
  color: #374151;
  font-size: 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.detail-tags span {
  padding: 5px 10px;
  color: #7c2d12;
  border-radius: 999px;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 850;
}

.player-shell {
  padding: 0 0 54px;
}

.player-card {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.player-head h2 {
  margin: 0;
  font-size: 18px;
}

.player-source {
  color: #bfdbfe;
  font-size: 13px;
  font-weight: 800;
}

.video-stage {
  position: relative;
  background: #020617;
}

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

.video-play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.88);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
  transform: translate(-50%, -50%);
  cursor: pointer;
  font-size: 26px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.video-play-overlay:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

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

.content-panel {
  padding: 34px;
  border: 1px solid var(--color-line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.content-panel + .content-panel {
  margin-top: 22px;
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-panel p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

.content-panel p + p {
  margin-top: 12px;
}

.search-empty {
  padding: 34px;
  border: 1px dashed #bfdbfe;
  border-radius: 24px;
  color: var(--color-muted);
  background: #eff6ff;
  text-align: center;
  font-weight: 800;
}

.site-footer {
  margin-top: 40px;
  padding: 54px 0 34px;
  color: #d1d5db;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 28px;
}

.footer-title {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.footer-desc {
  max-width: 580px;
  margin: 0;
  color: #9ca3af;
}

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

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: #94a3b8;
  font-size: 13px;
}

.hidden-by-filter {
  display: none !important;
}

@media (max-width: 1120px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-slide.is-active {
    grid-template-columns: minmax(0, 1fr) 280px;
    padding: 52px;
  }

  .hero-poster {
    width: 260px;
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 66px;
  }

  .main-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .hero-slide.is-active {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 40px 28px 88px;
  }

  .hero-poster-wrap {
    justify-self: start;
  }

  .hero-poster {
    width: min(240px, 72vw);
  }

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

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

  .section-head {
    display: block;
  }

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

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

  .detail-poster {
    max-width: 320px;
  }

  .rank-item {
    grid-template-columns: 54px 68px minmax(0, 1fr);
  }

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

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

@media (max-width: 560px) {
  .container,
  .header-inner,
  .mobile-panel,
  .hero-carousel {
    width: min(100% - 20px, var(--site-width));
  }

  .site-logo__text {
    font-size: 18px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-copy p {
    font-size: 15px;
  }

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

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

  .movie-card__body {
    padding: 12px;
  }

  .movie-card__summary,
  .movie-card__tags {
    display: none;
  }

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