:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --indigo: #4f46e5;
  --amber: #f59e0b;
  --dark: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #eef4ff 42%, #f8fafc 100%);
  color: var(--dark);
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

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

.nav-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand {
  font-size: 20px;
  color: #0f172a;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.desktop-nav a,
.mobile-nav a {
  color: #475569;
  font-size: 14px;
  font-weight: 650;
  padding: 9px 12px;
  border-radius: 999px;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--blue);
  background: #eff6ff;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 10px;
}

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

.mobile-nav {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 670px;
  background: radial-gradient(circle at 12% 20%, rgba(37, 99, 235, 0.2), transparent 32%), linear-gradient(135deg, #0f172a 0%, #1d4ed8 54%, #312e81 100%);
  color: white;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
}

.hero::before {
  width: 360px;
  height: 360px;
  background: rgba(96, 165, 250, 0.28);
  left: -120px;
  top: 90px;
}

.hero::after {
  width: 420px;
  height: 420px;
  background: rgba(245, 158, 11, 0.16);
  right: -160px;
  bottom: -160px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.7s ease;
  pointer-events: none;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.32;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.76) 42%, rgba(15, 23, 42, 0.46) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  min-height: 670px;
  margin: 0 auto;
  padding: 70px 18px 78px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 48px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #bfdbfe;
  font-weight: 700;
  font-size: 14px;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
  max-width: 720px;
}

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

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

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

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
  box-shadow: 0 18px 32px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: white;
}

.btn-blue {
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: white;
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.22);
}

.hero-panel {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  padding: 16px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
}

.hero-panel-info {
  padding: 16px 6px 4px;
}

.hero-panel-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.hero-panel-info p {
  margin: 0;
  font-size: 14px;
  color: #dbeafe;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

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

.search-strip {
  max-width: 1180px;
  margin: -34px auto 0;
  position: relative;
  z-index: 8;
  padding: 0 18px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 14px;
}

.search-box input,
.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  background: white;
  color: #0f172a;
  outline: none;
  transition: border 0.22s ease, box-shadow 0.22s ease;
}

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

.page-main,
.content-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 62px 18px;
}

.section {
  margin-bottom: 66px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

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

.section-link {
  color: var(--blue);
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.14);
  border-color: rgba(37, 99, 235, 0.25);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.36s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.66) 100%);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
  font-size: 18px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2);
}

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

.year-pill,
.rank-badge {
  position: absolute;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.year-pill {
  right: 10px;
  background: rgba(15, 23, 42, 0.72);
  color: white;
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 10px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
}

.movie-card-body {
  padding: 14px;
}

.movie-card-body h2 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card-body h2 a:hover {
  color: var(--blue);
}

.movie-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.movie-meta a {
  color: var(--blue);
  font-weight: 750;
}

.movie-card-body p {
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag-row span,
.info-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 750;
  padding: 5px 9px;
}

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

.category-card {
  min-height: 170px;
  padding: 20px;
  border-radius: 24px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.2);
  position: relative;
  overflow: hidden;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  color: #dbeafe;
  line-height: 1.7;
  margin: 0 0 18px;
  font-size: 14px;
}

.category-card strong {
  font-size: 28px;
}

.page-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 60%, #312e81 100%);
  color: white;
  padding: 66px 18px;
}

.page-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.05em;
}

.page-hero p {
  color: #dbeafe;
  line-height: 1.8;
  max-width: 800px;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #dbeafe;
  font-size: 14px;
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  color: white;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 88px 1fr auto;
  gap: 16px;
  align-items: center;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.rank-num {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
}

.rank-item img {
  width: 88px;
  height: 118px;
  object-fit: cover;
  border-radius: 14px;
  background: #eff6ff;
}

.rank-item h2 {
  margin: 0 0 7px;
  font-size: 20px;
}

.rank-item p {
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
}

.player-card,
.detail-card,
.side-card {
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: #000;
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.78));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.big-play {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  font-size: 34px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
}

.detail-card {
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.info-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-section p {
  color: #475569;
  line-height: 1.95;
  margin: 0;
}

.side-card {
  padding: 18px;
}

.side-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: #eff6ff;
}

.side-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.side-item span {
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  background: linear-gradient(135deg, #0f172a, #111827 54%, #1e1b4b);
  color: #cbd5e1;
  margin-top: 38px;
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 18px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 32px;
}

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

.footer-grid p,
.footer-grid li {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid a:hover {
  color: #60a5fa;
}

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

.empty-result {
  display: none;
  background: white;
  border-radius: 24px;
  padding: 42px;
  text-align: center;
  color: var(--muted);
  box-shadow: var(--shadow);
}

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-panel {
    max-width: 420px;
  }

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

@media (max-width: 720px) {
  .hero,
  .hero-inner {
    min-height: 760px;
  }

  .hero-inner {
    padding-top: 46px;
    gap: 28px;
  }

  .search-box,
  .filter-row,
  .rank-item {
    grid-template-columns: 1fr;
  }

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

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

  .rank-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }

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

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

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