:root {
  --bg: #0f5132;
  --bg-deep: #0a3d24;
  --felt: #1a6b3f;
  --fg: #f8f9fa;
  --accent: #ffd166;
  --danger: #ef476f;
  --muted: #adb5bd;
  --card-bg: #ffffff;
  --card-fg: #1a1a1a;
  --red: #c81d25;
  --black: #1a1a1a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--fg);
  min-height: 100vh;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 80ms ease, background 200ms ease;
}

button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }

button.primary {
  background: var(--accent);
  color: var(--bg-deep);
}
button.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
button.ghost:hover { background: rgba(255, 255, 255, 0.1); }

input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
  color: var(--fg);
  font-size: 14px;
}
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---------- Lobby ---------- */

.lobby {
  max-width: 520px;
  margin: 0 auto;
  padding: 60px 20px;
}

.lobby h1 {
  font-size: 48px;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 40px;
}

.card-form {
  background: rgba(0, 0, 0, 0.25);
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-form h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.card-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.card-form button { margin-top: 8px; }

/* ---------- Perfil ---------- */

.profile-card {
  border: 1px solid rgba(255, 209, 102, 0.3);
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.08), rgba(0, 0, 0, 0.25));
}

.profile-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
}

.profile-level {
  background: var(--accent);
  color: var(--bg-deep);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
}

.profile-points {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

.profile-stats {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 0;
}

.profile-stats strong {
  color: var(--fg);
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 24px;
  text-align: center;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--danger);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  z-index: 100;
  font-size: 14px;
  animation: fadeIn 200ms ease;
}
.toast.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.overlay.hidden { display: none; }
.overlay-content {
  background: var(--bg-deep);
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
}
.overlay-content h2 {
  margin: 0 0 8px;
  color: var(--accent);
}
.overlay-content p {
  color: var(--muted);
  margin: 0 0 24px;
}
.overlay-content button {
  background: var(--accent);
  color: var(--bg-deep);
}
.overlay-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

button.small {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
}

#btn-copy {
  margin-left: 8px;
}
