/* style.css — Styles communs : reset, layout de base, écran d'accueil, lobby.
   Rien ici sur la présentation des jeux : chaque jeu a son propre fichier
   CSS (games/xxx.css) et ses propres classes, sans rien partager entre eux
   pour rester libre d'avoir un design complètement différent. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #2121d3;
  color: #eaeaea;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s;
}

#app {
  width: 100%;
  max-width: 420px;
  padding: 24px;
}

.card {
  background: #16213e;
  border-radius: 12px;
  padding: 32px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

h1 {
  text-align: center;
  margin: 0 0 24px;
  font-size: 1.6rem;
}

.room-code {
  text-align: center;
  font-size: 2.2rem;
  letter-spacing: 6px;
  font-weight: bold;
  color: #4ecdc4;
  margin: 8px 0 24px;
}

input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #0f1729;
  color: #eaeaea;
  font-size: 1rem;
}

button {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: none;
  border-radius: 8px;
  background: #4ecdc4;
  color: #0f1729;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.15s;
}

button:hover {
  opacity: 0.85;
}

button.secondary {
  background: transparent;
  border: 1px solid #4ecdc4;
  color: #4ecdc4;
}

.divider {
  text-align: center;
  margin: 16px 0;
  color: #666;
  font-size: 0.85rem;
}

.player-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.player-list li {
  padding: 10px 14px;
  background: #0f1729;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Composant avatar partagé (juste le rond de base ; chaque jeu peut le retailler) */
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #1a1a2e;
  flex-shrink: 0;
}

.avatar-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.avatar-lg {
  width: 110px;
  height: 110px;
}

/* Badge pastille (HOST dans le lobby) */
.badge {
  background: #4ecdc4;
  color: #0f1729;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: bold;
}

.kick-btn {
  width: auto;
  margin: 0;
  padding: 4px 10px;
  font-size: 0.75rem;
  background: #e94560;
  color: white;
}

.player-list li.disconnected {
  opacity: 0.5;
}

.player-list li.disconnected em {
  font-style: normal;
  font-size: 0.75rem;
  color: #888;
}

.error {
  background: #e94560;
  color: white;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  text-align: center;
}

.waiting {
  text-align: center;
  color: #888;
  font-size: 0.85rem;
}
