:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef7ff;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --cyan: #06b6d4;
  --teal: #0d9488;
  --rose: #f43f5e;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 30rem),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 42%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.brand span,
.footer-brand span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan), var(--teal));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

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

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--primary-dark);
  background: #eaf3ff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #eaf3ff;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: #1e3a8a;
}

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

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

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 110px 0 78px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.28)),
    var(--hero-bg);
  background-size: cover;
  background-position: center;
}

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

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  align-items: center;
  gap: 46px;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #dbeafe;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 24px 0 16px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-copy p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.26);
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan), var(--teal));
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(8px);
}

.hero-panel {
  position: relative;
  min-height: 420px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  transform: rotate(1.5deg);
}

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

.hero-panel-info {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
}

.hero-panel-info strong {
  display: block;
  font-size: 22px;
}

.hero-panel-info span {
  display: block;
  margin-top: 4px;
  color: #bfdbfe;
  font-weight: 700;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dot.active {
  background: #ffffff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 26px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

.section {
  padding: 72px 0;
}

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

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

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

.page-hero {
  padding: 76px 0 34px;
}

.page-hero.compact {
  padding-bottom: 10px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.07em;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.search-panel {
  margin: 26px 0 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.search-panel input {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 0 16px;
  background: #f8fafc;
  color: #0f172a;
}

.search-panel button {
  min-width: 108px;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.movie-card a {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

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

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

.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.card-body {
  display: flex;
  min-height: 190px;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.card-meta {
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.card-body p {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

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

.tag-row span,
.meta-pill {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  padding: 26px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0891b2, #0d9488);
  box-shadow: var(--shadow);
}

.category-card:nth-child(3n + 2) {
  background: linear-gradient(135deg, #0f172a, #2563eb, #06b6d4);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #f43f5e, #f97316, #f59e0b);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.category-card .category-link {
  display: inline-flex;
  margin-top: 22px;
  padding: 10px 15px;
  border-radius: 999px;
  color: #0f172a;
  background: #ffffff;
  font-weight: 900;
}

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

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

.rank-num {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  font-size: 22px;
  font-weight: 900;
}

.rank-poster {
  width: 92px;
  height: 126px;
  overflow: hidden;
  border-radius: 14px;
}

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

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 36px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb a {
  color: var(--primary-dark);
}

.detail-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.detail-summary {
  margin: 16px 0 24px;
  color: #334155;
  font-size: 18px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.player-section,
.content-section,
.related-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.video-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 28px 78px rgba(15, 23, 42, 0.24);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.7)),
    rgba(15, 23, 42, 0.18);
  cursor: pointer;
  transition: opacity 0.24s ease;
}

.play-circle {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan), var(--teal));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.38);
  font-size: 28px;
  font-weight: 900;
}

.video-box.is-playing .player-cover {
  opacity: 0;
  pointer-events: none;
}

.content-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.content-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

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

.movie-card.small .card-body {
  min-height: 150px;
}

.site-footer {
  margin-top: 70px;
  padding: 48px 0;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.footer-brand {
  color: #ffffff;
}

.footer-inner p {
  margin: 0;
}

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

.footer-links a {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
}

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

.empty-state {
  display: none;
  padding: 28px;
  border: 1px dashed #94a3b8;
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
}

.empty-state.show {
  display: block;
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-panel {
    min-height: 320px;
  }

  .hero-panel img {
    min-height: 320px;
  }

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

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

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .hero-carousel {
    min-height: 780px;
  }

  .hero-slide {
    padding-top: 92px;
  }

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

  .hero-arrow {
    display: none;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .card-body {
    min-height: 170px;
    padding: 14px;
  }

  .rank-item {
    grid-template-columns: 48px 72px 1fr;
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }

  .rank-num {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 18px;
  }

  .rank-poster {
    width: 72px;
    height: 98px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-carousel {
    min-height: 820px;
  }

  .brand {
    font-size: 20px;
  }

  .play-circle {
    width: 76px;
    height: 76px;
    font-size: 22px;
  }
}
