:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #7c3aed;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  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.16), transparent 30rem),
    linear-gradient(180deg, #f8fbff 0%, #eef3fb 50%, #f7f7fb 100%);
  min-height: 100vh;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

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

button,
input,
select {
  font: inherit;
}

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

.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);
}

.header-inner {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.24);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

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

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

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--surface-soft);
  cursor: pointer;
}

.hero {
  position: relative;
  padding: 34px 0 46px;
}

.hero-shell {
  overflow: hidden;
  position: relative;
  min-height: 510px;
  border-radius: 36px;
  background: #101827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 38px;
  padding: 58px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(37, 99, 235, 0.38), transparent 30rem),
    linear-gradient(120deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.86) 45%, rgba(15, 23, 42, 0.42) 100%);
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(191, 219, 254, 0.28);
  font-size: 14px;
  font-weight: 700;
}

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

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

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

.hero-meta span,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #1e40af;
  background: #dbeafe;
  font-size: 13px;
  font-weight: 750;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  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(--primary), var(--accent));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
}

.btn-secondary {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-soft {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.hero-poster-wrap {
  justify-self: end;
  width: min(360px, 100%);
  transform: rotate(2deg);
}

.hero-poster {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 32px;
  background: linear-gradient(135deg, #dbeafe, #f5f3ff);
  border: 8px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.hero-dots {
  position: absolute;
  left: 58px;
  bottom: 34px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-dot {
  width: 28px;
  height: 6px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

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

.section {
  padding: 34px 0;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.section-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 760px;
}

.search-panel,
.info-panel,
.video-panel,
.category-card,
.movie-card,
.rank-card,
.text-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.search-panel {
  padding: 18px;
  border-radius: var(--radius-xl);
  margin-bottom: 22px;
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 180px));
  gap: 12px;
}

.catalog-tools input,
.catalog-tools select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: #ffffff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  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.24);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.poster-link {
  display: block;
  position: relative;
  overflow: hidden;
  background: #e2e8f0;
}

.poster-img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #f5f3ff);
  transition: transform 0.3s ease;
}

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

.card-ribbon {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.movie-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-desc {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: var(--radius-xl);
  padding: 22px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.count-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-weight: 850;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 74px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
}

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

.rank-thumb {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: #dbeafe;
}

.detail-hero {
  padding: 34px 0 24px;
}

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

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

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

.video-panel {
  overflow: hidden;
  border-radius: 32px;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.26), rgba(2, 6, 23, 0.52));
  border: 0;
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
}

.play-overlay.is-hidden {
  display: none;
}

.info-panel {
  border-radius: 32px;
  padding: 18px;
}

.detail-poster {
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #f5f3ff);
}

.detail-title {
  margin: 18px 0 10px;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.detail-meta strong {
  color: var(--text);
}

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

.text-panel {
  border-radius: 28px;
  padding: 26px;
  margin-top: 18px;
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
  white-space: pre-wrap;
}

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

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

.footer-grid h3,
.footer-grid h4 {
  margin: 0 0 12px;
  color: #ffffff;
}

.footer-grid p,
.footer-grid a {
  color: #cbd5e1;
  line-height: 1.8;
}

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

.empty-state {
  display: none;
  padding: 22px;
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: #ffffff;
  border: 1px dashed var(--line);
}

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

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

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

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

  .info-panel {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }

  .detail-title {
    margin-top: 0;
  }
}

@media (max-width: 820px) {
  .mobile-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    border-radius: 14px;
  }

  .hero-shell {
    min-height: 720px;
    border-radius: 26px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px;
  }

  .hero-poster-wrap {
    justify-self: start;
    width: min(240px, 70%);
  }

  .hero-dots {
    left: 30px;
    bottom: 26px;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }

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

  .rank-card {
    grid-template-columns: 52px 74px minmax(0, 1fr);
  }

  .rank-card .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .hero-shell {
    min-height: 680px;
  }

  .hero-slide {
    padding: 24px;
  }

  .hero h1 {
    font-size: 36px;
  }

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

  .section-head {
    display: block;
  }

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

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

  .info-panel {
    display: block;
  }

  .detail-title {
    margin-top: 16px;
  }

  .text-panel {
    padding: 20px;
  }
}
