/* ============================================================
   赛博万神殿 — Lobby Scene (lobby.css)
   大厅路由选择器
   ============================================================ */

.lobby-container {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8);
  position: relative;
  overflow: hidden;
}

/* Ambient background glow */
.lobby-container::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.06) 0%, transparent 70%);
  pointer-events: none;
  animation: breathe 6s ease-in-out infinite;
}

.lobby-container::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(255, 0, 110, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* Title area */
.lobby-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4rem);
  text-align: center;
  margin-bottom: var(--sp-2);
  background: linear-gradient(135deg, var(--gold), var(--neon-magenta), var(--neon-cyan));
  background-size: 200% 200%;
  animation: gradientShift 8s ease-in-out infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.2));
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.lobby-subtitle {
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--sp-12);
  letter-spacing: 0.08em;
}

/* Scene selection cards */
.lobby-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-6);
  max-width: 720px;
  width: 100%;
  margin-bottom: var(--sp-12);
}

.lobby-card {
  position: relative;
  padding: var(--sp-8) var(--sp-6);
  border-radius: var(--r-xl);
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--glass-border);
  text-align: center;
  cursor: pointer;
  transition: all var(--dur-slow) var(--ease-out-expo);
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.lobby-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--dur-slow);
  pointer-events: none;
}

.lobby-card:nth-child(1)::before {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.06), rgba(0, 245, 212, 0.04));
}

.lobby-card:nth-child(2)::before {
  background: linear-gradient(135deg, rgba(255, 59, 59, 0.06), rgba(255, 215, 0, 0.04));
}

.lobby-card:hover::before {
  opacity: 1;
}

.lobby-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--glass-border-hover);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.lobby-card:nth-child(1):hover {
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.08), 0 16px 48px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 215, 0, 0.2);
}

.lobby-card:nth-child(2):hover {
  box-shadow: 0 0 40px rgba(255, 59, 59, 0.08), 0 16px 48px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 59, 59, 0.2);
}

.lobby-card:active {
  transform: translateY(-2px) scale(0.98);
}

.lobby-card-icon {
  font-size: 3.5rem;
  margin-bottom: var(--sp-4);
  display: block;
  animation: breathe 4s ease-in-out infinite;
}

.lobby-card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: var(--sp-2);
  color: var(--text-primary);
}

.lobby-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.lobby-card-badge {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
}

/* Mute toggle */
.mute-toggle {
  position: fixed;
  top: var(--sp-4);
  right: var(--sp-4);
  z-index: var(--z-nav);
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--dur-normal);
}

.mute-toggle:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

/* Merit counter display */
.merit-display {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold);
  position: fixed;
  top: var(--sp-4);
  left: var(--sp-4);
  z-index: var(--z-nav);
}

.merit-display .merit-icon { font-size: 1.1rem; }
.merit-display .merit-value { font-weight: 700; }

/* Back button */
.back-btn {
  position: fixed;
  top: var(--sp-4);
  left: var(--sp-4);
  z-index: var(--z-nav);
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  display: none; /* shown on sub-scenes */
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--dur-normal);
}

.back-btn:hover {
  background: var(--glass-bg-hover);
  transform: translateX(-2px);
}

.back-btn.visible {
  display: flex;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .lobby-cards {
    grid-template-columns: 1fr;
  }

  .lobby-card {
    padding: var(--sp-6) var(--sp-4);
  }

  .lobby-card-icon { font-size: 2.5rem; }
  .lobby-card-title { font-size: 1.2rem; }
}
