/* Game Lab — AI-style game builder */

:root {
  --gl-bg: #0c0a14;
  --gl-panel: rgba(22, 18, 40, 0.92);
  --gl-accent: #a78bfa;
  --gl-mint: #5eead4;
  --gl-text: #f1f5f9;
  --gl-dim: #94a3b8;
}

body.game-lab-page {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse 100% 80% at 50% -20%, #312e81 0%, var(--gl-bg) 55%);
  color: var(--gl-text);
  font-family: "Segoe UI", system-ui, sans-serif;
  padding: 20px 16px 40px;
  box-sizing: border-box;
}

.game-lab-shell {
  max-width: 720px;
  margin: 0 auto;
}

.game-lab-back {
  display: inline-block;
  color: var(--gl-mint);
  text-decoration: none;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.game-lab-back:hover {
  text-decoration: underline;
}

.game-lab-title {
  font-size: clamp(1.6rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  background: linear-gradient(120deg, #c4b5fd, #5eead4, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.game-lab-lead {
  color: var(--gl-dim);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 20px;
}

.game-lab-panel {
  background: var(--gl-panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.game-lab-panel h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gl-accent);
  margin: 0 0 12px;
}

.game-lab-prompt {
  width: 100%;
  min-height: 100px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--gl-text);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.game-lab-prompt:focus {
  outline: 2px solid rgba(167, 139, 250, 0.5);
  border-color: rgba(167, 139, 250, 0.4);
}

.game-lab-examples {
  font-size: 0.8rem;
  color: var(--gl-dim);
  margin: 10px 0 14px;
  line-height: 1.45;
}

.game-lab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.game-lab-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--gl-dim);
  font-size: 0.8rem;
  font-family: inherit;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.game-lab-chip:hover {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.35);
  color: var(--gl-text);
}

.game-lab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.game-lab-btn {
  appearance: none;
  border: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
  transition: transform 0.12s, filter 0.12s;
}

.game-lab-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.game-lab-btn:active {
  transform: translateY(0);
}

.game-lab-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gl-text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.game-lab-ai-msg {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.2);
  font-size: 0.92rem;
  line-height: 1.55;
  color: #e2e8f0;
}

.game-lab-ai-msg strong {
  color: var(--gl-mint);
}

.game-lab-stage-wrap {
  margin-top: 16px;
}

.game-lab-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  background: #0f0d18;
  touch-action: none;
}

.game-lab-stage canvas {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.game-lab-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.game-lab-hint {
  font-size: 0.78rem;
  color: var(--gl-dim);
  margin-top: 10px;
  text-align: center;
  line-height: 1.4;
}

.game-lab-footer-note {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--gl-dim);
  line-height: 1.5;
}

@media (max-width: 480px) {
  .game-lab-row {
    flex-direction: column;
    align-items: stretch;
  }

  .game-lab-btn {
    width: 100%;
  }
}
