:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --brand: #0891b2;
  --brand-2: #2563eb;
  --accent: #f59e0b;
  --dark: #020617;
  --radius: 24px;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 34px rgba(8, 145, 178, 0.28);
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #e0f2fe;
  padding: 10px;
}

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

.mobile-nav {
  display: none;
  padding: 0 20px 16px;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.mobile-link {
  padding: 9px 14px;
  background: #f1f5f9;
}

.hero {
  position: relative;
  overflow: hidden;
  background: #020617;
}

.hero-slider {
  position: relative;
  min-height: 640px;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.64) 42%, rgba(2, 6, 23, 0.18)), linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 640px;
  margin: 0 auto;
  padding: 88px 20px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 48px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.22);
  border: 1px solid rgba(103, 232, 249, 0.22);
  font-weight: 800;
}

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

.hero h1 {
  max-width: 780px;
  color: #ffffff;
  text-shadow: 0 14px 50px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.9;
}

.hero-actions,
.action-row {
  margin-top: 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(37, 99, 235, 0.34);
}

.btn.secondary {
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.22);
  box-shadow: none;
}

.hero-panel {
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}

.hero-poster {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.4);
}

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

.hero-panel-title {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #ffffff;
}

.hero-panel-title strong {
  font-size: 22px;
}

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

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

.hero-dot.active {
  width: 56px;
  background: #22d3ee;
}

.main-section,
.page-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 20px 0;
}

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

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

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

.grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card,
.category-card,
.rank-list,
.info-panel,
.search-panel,
.player-shell,
.detail-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

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

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  min-width: 42px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.card-body h3 {
  margin: 8px 0;
  font-size: 19px;
  line-height: 1.32;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  min-height: 60px;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 800;
}

.category-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  min-height: 220px;
  transition: transform 0.2s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.18), rgba(37, 99, 235, 0.18));
}

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

.category-card p {
  position: relative;
  z-index: 2;
  color: var(--muted);
  line-height: 1.8;
}

.category-card .btn {
  position: relative;
  z-index: 2;
  margin-top: 18px;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 28px;
}

.rank-list {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.mini-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  background: #f1f5f9;
  transform: translateX(4px);
}

.mini-card img {
  width: 72px;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
}

.mini-info {
  min-width: 0;
}

.mini-info strong,
.mini-info em {
  display: block;
}

.mini-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}

.mini-info em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.mini-rank {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: #0f172a;
  font-weight: 900;
}

.page-hero {
  background: radial-gradient(circle at top left, rgba(8, 145, 178, 0.2), transparent 34%), linear-gradient(135deg, #ffffff 0%, #ecfeff 52%, #eff6ff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.page-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 20px 58px;
}

.page-hero h1 {
  max-width: 860px;
  color: #0f172a;
}

.page-hero p {
  max-width: 760px;
  color: #475569;
  font-size: 18px;
  line-height: 1.9;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #0e7490;
  font-weight: 800;
}

.search-panel {
  margin-bottom: 28px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1 1 260px;
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0 18px;
  color: #0f172a;
  outline: none;
  background: #ffffff;
}

.search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.filter-select {
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0 16px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
}

.detail-hero {
  background: #020617;
  color: #ffffff;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.detail-hero-bg img {
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: blur(4px);
  transform: scale(1.04);
}

.detail-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72));
}

.detail-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 58px 20px 64px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-title h1 {
  color: #ffffff;
}

.detail-title p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.9;
}

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

.detail-meta span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e0f2fe;
  font-weight: 800;
}

.detail-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

.player-shell {
  overflow: hidden;
  margin-bottom: 28px;
  background: #020617;
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28));
  cursor: pointer;
  z-index: 3;
}

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

.play-button {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.36);
}

.detail-card {
  padding: 28px;
  margin-bottom: 24px;
}

.detail-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.detail-card p {
  color: #475569;
  line-height: 2;
  white-space: pre-line;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: 22px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}

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

.site-footer {
  margin-top: 84px;
  background: #020617;
  color: #e2e8f0;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 20px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  color: #94a3b8;
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: #67e8f9;
}

.footer-copy {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 28px;
  color: #64748b;
}

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

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

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

  .menu-toggle {
    display: block;
  }

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

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

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

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

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

  .detail-inner {
    padding-top: 40px;
  }

  .detail-poster {
    max-width: 320px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    min-height: 64px;
  }

  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 38px;
    height: 38px;
  }

  .hero-slider,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 58px;
    gap: 28px;
  }

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

  .main-section,
  .page-section {
    padding-top: 52px;
  }

  .mini-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .mini-rank {
    display: none;
  }

  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .search-input,
  .filter-select {
    width: 100%;
  }
}
