* {
  box-sizing: border-box;
}

:root {
  --sky: #0284c7;
  --sky-light: #38bdf8;
  --sky-soft: #e0f2fe;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef7ff 48%, #ffffff 100%);
}

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

img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.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);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--sky), var(--sky-light));
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--sky);
  background: var(--sky-soft);
}

.top-search {
  display: flex;
  align-items: center;
  width: 300px;
  padding: 4px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(2, 132, 199, 0.08);
}

.top-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 10px 12px;
  font-size: 14px;
  background: transparent;
}

.top-search button,
.primary-btn,
.secondary-btn,
.filter-btn,
.player-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: 0.22s ease;
}

.top-search button,
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--sky), var(--sky-light));
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.25);
}

.top-search button {
  padding: 10px 16px;
  border-radius: 999px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
}

.secondary-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.top-search button:hover,
.player-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(14, 165, 233, 0.35);
}

.secondary-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.26);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.95);
}

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

.mobile-link {
  display: block;
  margin-top: 8px;
}

.mobile-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mobile-category-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 13px;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  color: #fff;
  background: #020617;
}

.hero-slide {
  display: none;
  min-height: 640px;
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  display: block;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 380px;
  align-items: center;
  gap: 44px;
  min-height: 640px;
  padding: 80px 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.85);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

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

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

.hero-meta span,
.detail-meta span,
.tag-row span,
.card-meta span,
.page-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.hero-meta span {
  padding: 9px 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

.hero-poster {
  position: relative;
  padding: 12px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-poster img {
  height: 520px;
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

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

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

.hero-dots button.active {
  background: #fff;
}

.section {
  padding: 58px 0;
}

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

.page-kicker {
  padding: 8px 12px;
  color: #0369a1;
  background: var(--sky-soft);
  font-size: 13px;
}

.section h2,
.page-title h1,
.detail-title h1 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p,
.detail-title p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--sky);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  transition: 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #e2e8f0;
}

.poster-link img {
  height: 100%;
  transition: 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 132, 199, 0.9);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

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

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta span {
  padding: 6px 9px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--sky);
}

.movie-card p {
  min-height: 48px;
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  padding: 5px 8px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border: 1px solid rgba(125, 211, 252, 0.45);
  border-radius: 26px;
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
  box-shadow: 0 16px 38px rgba(2, 132, 199, 0.11);
  transition: 0.24s ease;
}

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

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

.category-card p {
  margin: 0 0 20px;
  color: #475569;
  line-height: 1.8;
}

.category-card span {
  color: var(--sky);
  font-weight: 900;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--sky), var(--sky-light));
  font-weight: 900;
}

.rank-item img {
  height: 118px;
  border-radius: 16px;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

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

.rank-action {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--sky);
  background: var(--sky-soft);
  font-weight: 900;
}

.page-hero {
  padding: 60px 0 22px;
}

.page-title {
  padding: 42px;
  border-radius: 34px;
  color: #0f172a;
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
  box-shadow: 0 16px 42px rgba(2, 132, 199, 0.12);
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 28px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.08);
}

.filter-panel input,
.filter-panel select {
  flex: 1 1 190px;
  height: 44px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 0 14px;
  color: #0f172a;
  outline: 0;
  background: #fff;
}

.filter-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--sky);
}

.detail-hero {
  padding: 46px 0 22px;
}

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

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

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

.detail-cover {
  overflow: hidden;
  border-radius: 30px;
  background: #e2e8f0;
  box-shadow: var(--shadow);
}

.detail-cover img {
  aspect-ratio: 2 / 3;
}

.detail-meta span {
  padding: 8px 11px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 13px;
}

.detail-title {
  padding: 28px 0;
}

.detail-title h1 {
  margin-bottom: 18px;
}

.player-section {
  padding: 26px 0 36px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #020617;
  box-shadow: 0 26px 68px rgba(2, 6, 23, 0.32);
}

.player-box video {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.25), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

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

.player-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--sky), var(--sky-light));
  font-size: 17px;
}

.article-panel {
  padding: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

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

.article-panel p {
  color: #475569;
  line-height: 1.9;
}

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

.compact-card {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.compact-card img {
  aspect-ratio: 2 / 3;
  transition: 0.3s ease;
}

.compact-card span,
.compact-card small {
  display: block;
  padding: 0 12px;
}

.compact-card span {
  margin-top: 12px;
  font-weight: 900;
}

.compact-card small {
  margin: 6px 0 14px;
  color: #64748b;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
}

.footer-brand {
  color: #fff;
}

.site-footer p {
  max-width: 520px;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

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

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

.empty-state {
  display: none;
  padding: 32px;
  border-radius: 24px;
  background: #fff;
  color: #64748b;
  text-align: center;
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-poster {
    max-width: 360px;
  }

  .hero-poster img {
    height: 440px;
  }

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

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

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

  .nav-wrap {
    height: 64px;
  }

  .brand {
    font-size: 18px;
  }

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

  .hero,
  .hero-slide,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding: 56px 0 90px;
  }

  .hero-poster {
    display: none;
  }

  .movie-grid,
  .category-grid,
  .related-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .rank-item {
    display: block;
  }

  .rank-item img {
    width: 100%;
    height: auto;
    margin: 12px 0;
  }

  .page-title,
  .article-panel {
    padding: 24px;
    border-radius: 24px;
  }
}
