* {
  box-sizing: border-box;
}

:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --dark: #0f172a;
  --muted: #64748b;
  --light: #f8fafc;
  --line: #e2e8f0;
  --card: #ffffff;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #1f2937;
  background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 42%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.nav-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

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

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

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

.nav-link {
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #eef2ff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #1e293b;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid #e5edf8;
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #1f2937;
  font-weight: 700;
}

.mobile-link.subtle {
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  margin: 0 -22px 48px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 15%, rgba(34, 211, 238, 0.42), transparent 34%), linear-gradient(135deg, #1d4ed8 0%, #0891b2 52%, #0f172a 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -22% 18%;
  height: 240px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(70px);
}

.hero-slider {
  position: relative;
  max-width: 1200px;
  min-height: 620px;
  margin: 0 auto;
  padding: 58px 22px 42px;
}

.hero-slide {
  display: none;
  min-height: 520px;
  align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  gap: 46px;
}

.hero-slide.active {
  display: grid;
  animation: fadeUp 0.7s ease both;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #e0f2fe;
  font-weight: 800;
  font-size: 14px;
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 20px 0 18px;
  max-width: 780px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: clamp(17px, 2.2vw, 23px);
}

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

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

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

.btn.primary {
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
}

.btn.ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #e0f2fe;
  font-size: 13px;
  font-weight: 700;
}

.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  border-radius: 30px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.36);
  background: rgba(15, 23, 42, 0.4);
}

.hero-poster img {
  width: 100%;
  height: 440px;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 22%, rgba(15, 23, 42, 0.72) 100%);
}

.hero-card-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(16px);
}

.hero-card-caption strong {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}

.hero-card-caption span {
  display: block;
  color: #dbeafe;
  font-size: 14px;
}

.hero-dots {
  position: absolute;
  left: 22px;
  bottom: 30px;
  display: flex;
  gap: 10px;
  z-index: 4;
}

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

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

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

.section-head h1,
.section-head h2,
.page-title h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.stat-card,
.category-card,
.filter-panel,
.detail-panel,
.content-box {
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.stat-card {
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover,
.category-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.stat-card b {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 34px;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

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

.category-card {
  overflow: hidden;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card h2,
.category-card h3,
.content-box h2,
.detail-panel h1 {
  margin: 0 0 10px;
  color: #0f172a;
  line-height: 1.2;
}

.category-card p,
.content-box p,
.detail-panel p {
  color: var(--muted);
}

.category-preview {
  display: flex;
  margin-top: 18px;
}

.category-preview img {
  width: 58px;
  height: 82px;
  object-fit: cover;
  margin-right: -12px;
  border: 3px solid #ffffff;
  border-radius: 16px;
  background: #dbeafe;
}

.filter-panel {
  margin: 24px 0 30px;
  padding: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #ffffff;
}

.search-box span {
  color: #94a3b8;
  font-size: 22px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #0f172a;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-btn {
  border: 0;
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  background: #eef2ff;
  font-weight: 800;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card[hidden],
.ranking-row[hidden] {
  display: none;
}

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

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

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

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.movie-info {
  padding: 16px;
}

.movie-meta,
.detail-meta,
.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.movie-info h2 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

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

.movie-info p {
  min-height: 46px;
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
}

.movie-card .tag-row span {
  color: var(--blue);
  background: #eff6ff;
}

.movie-card.small .movie-info p {
  display: none;
}

.page-title {
  padding: 42px 0 10px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.25);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  z-index: 3;
}

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

.play-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.34);
  font-size: 26px;
}

.detail-panel {
  padding: 24px;
}

.detail-panel h1 {
  font-size: clamp(28px, 3vw, 40px);
}

.detail-panel .tag-row span {
  color: var(--blue);
  background: #eff6ff;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin: 24px 0 42px;
}

.content-box {
  padding: 26px;
}

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

.ranking-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 48px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 58px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

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

.ranking-thumb {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-title {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
  font-weight: 900;
  font-size: 18px;
}

.ranking-title:hover {
  color: var(--blue);
}

.empty-state {
  display: none;
  padding: 50px 20px;
  text-align: center;
  color: #64748b;
}

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

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

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 22px;
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 1fr;
  gap: 38px;
}

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

.footer-grid p {
  max-width: 420px;
  color: #94a3b8;
}

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

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

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

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero {
    min-height: auto;
  }

  .hero-slider {
    min-height: auto;
  }

  .hero-dots {
    position: static;
    margin-top: 22px;
  }

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

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

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

@media (max-width: 680px) {
  .nav-wrap {
    padding: 14px 16px;
  }

  .brand-text {
    font-size: 21px;
  }

  .main {
    padding: 0 16px 42px;
  }

  .hero {
    margin-left: -16px;
    margin-right: -16px;
  }

  .hero-slider {
    padding: 40px 16px 34px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 300px;
    height: 300px;
  }

  .section-head {
    display: block;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info h2 {
    font-size: 16px;
  }

  .movie-info p {
    min-height: 40px;
    font-size: 13px;
  }

  .ranking-row {
    grid-template-columns: 42px 54px minmax(0, 1fr);
  }

  .ranking-row .btn {
    grid-column: 2 / 4;
    min-height: 40px;
  }

  .rank-num {
    width: 38px;
    height: 38px;
  }

  .ranking-thumb {
    width: 52px;
    height: 70px;
  }
}
