* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #111827;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f1f5f9 100%);
  line-height: 1.65;
}

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: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 52%, #0f172a 100%);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
}

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

.navbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

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

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  color: #ffffff;
  min-height: 650px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.42), transparent 32%), linear-gradient(135deg, #0f172a 0%, #1e3a8a 48%, #111827 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.22;
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-size: cover;
  background-position: center;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.70) 43%, rgba(15, 23, 42, 0.18));
}

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

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 42px;
  padding: 108px 0 96px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  margin-bottom: 20px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(125, 211, 252, 0.28);
  backdrop-filter: blur(12px);
}

.hero h1,
.page-hero h1,
.detail-title {
  margin: 0;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-desc {
  margin: 22px 0 0;
  max-width: 680px;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-top: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
}

.pill.blue {
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid rgba(147, 197, 253, 0.36);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  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, #2563eb, #06b6d4);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
}

.btn-primary:hover {
  box-shadow: 0 22px 48px rgba(37, 99, 235, 0.42);
}

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

.btn-dark {
  color: #ffffff;
  background: #0f172a;
}

.hero-card {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-radius: 30px;
  min-height: 420px;
  background: rgba(15, 23, 42, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.hero-card img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  opacity: 0.95;
  transition: transform 0.35s ease;
}

.hero-card:hover img {
  transform: scale(1.05);
}

.hero-card-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.96));
}

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

.hero-arrows {
  position: absolute;
  z-index: 4;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 36px;
  display: flex;
  gap: 10px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: max(16px, calc((100vw - 1180px) / 2));
  bottom: 48px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 7px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.55;
}

.hero-dot.active {
  width: 48px;
  opacity: 1;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.section {
  padding: 64px 0;
}

.section.compact {
  padding: 42px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-block h2 {
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.15;
  margin: 0;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.category-card p,
.detail-intro {
  margin: 8px 0 0;
  color: #64748b;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

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

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

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

.play-chip {
  position: absolute;
  inset: auto 12px 12px auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.38);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  color: #0f172a;
}

.card-meta,
.rank-meta {
  color: #64748b;
  font-size: 13px;
}

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

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

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  color: #1e40af;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  display: block;
  padding: 26px;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card:nth-child(3n + 3) {
  background: linear-gradient(135deg, #7c3aed, #0f172a);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.2);
}

.category-card strong {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}

.category-card p {
  color: rgba(255, 255, 255, 0.78);
}

.page-hero {
  padding: 64px 0;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.35), transparent 30%), linear-gradient(135deg, #0f172a, #1e3a8a 62%, #111827);
}

.page-hero h1 {
  color: #ffffff;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(140px, 0.5fr));
  gap: 14px;
  padding: 18px;
  margin-bottom: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  outline: none;
  background: #f8fafc;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 96px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14);
}

.rank-number {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.rank-item img {
  width: 96px;
  height: 128px;
  object-fit: cover;
  border-radius: 16px;
  background: #dbeafe;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-panel,
.detail-block {
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.11);
}

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

.player-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.32), rgba(2, 6, 23, 0.70));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-layer.hidden {
  opacity: 0;
  visibility: hidden;
}

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 24px 54px rgba(37, 99, 235, 0.42);
  font-size: 30px;
}

.player-info {
  padding: 18px 22px 22px;
}

.detail-panel {
  padding: 22px;
}

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

.detail-panel .actions {
  margin-top: 18px;
}

.detail-meta {
  margin: 18px 0;
}

.detail-block {
  padding: 26px;
  margin-top: 28px;
}

.detail-block p {
  margin: 16px 0 0;
  color: #334155;
}

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

.breadcrumb {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.site-footer {
  margin-top: 50px;
  color: rgba(255, 255, 255, 0.78);
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  padding: 46px 0;
}

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

.footer-grid p,
.footer-grid li {
  margin: 0 0 9px;
  color: rgba(255, 255, 255, 0.68);
}

.copyright {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.56);
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 38px;
  border-radius: 22px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

@media (max-width: 980px) {
  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-card {
    max-width: 460px;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .navbar {
    min-height: 66px;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: #0f172a;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.3);
  }

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

  .hero {
    min-height: 760px;
  }

  .hero-content {
    padding: 78px 0 108px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .hero-arrows {
    right: 16px;
  }

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

  .section {
    padding: 46px 0;
  }

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

  .rank-item {
    grid-template-columns: 48px 76px minmax(0, 1fr);
  }

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

  .rank-item img {
    width: 76px;
    height: 104px;
  }
}
