* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #1a1a2e;
  color: #eee;
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
  height: 100vh;
}

#ecran-login {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.login-box {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 16px;
  padding: 2rem;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.login-box h1 { font-size: 28px; }
.login-box .subtitle { color: #888; font-size: 14px; }

input {
  background: #0f3460;
  border: 1px solid #1a4a80;
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

input:focus { border-color: #e94560; }

button {
  background: #e94560;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
}

button:hover { opacity: 0.85; }
button.secondary { background: #0f3460; }
.erreur { color: #e94560; font-size: 13px; min-height: 18px; }

#hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: rgba(22,33,62,0.95);
  padding: 10px 20px;
  display: flex;
  gap: 24px;
  align-items: center;
  z-index: 10;
  border-bottom: 1px solid #0f3460;
  font-size: 14px;
}

#hud span { color: #ccc; }
#hud-pseudo { color: #e94560; font-weight: 600; }
#hud-argent { color: #f5c842; font-weight: 600; }

#gameCanvas {
  position: absolute;
  top: 40px; left: 0;
  cursor: pointer;
}

#panel-terrain {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  min-width: 260px;
  text-align: center;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#panel-terrain h3 { font-size: 16px; color: #e94560; }
#panel-terrain p  { font-size: 13px; color: #aaa; }

#btn-admin {
  margin-left: auto;
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
#btn-admin:hover { opacity: 1; background: rgba(255,255,255,0.1); }

#modal-admin-login {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-box {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 16px;
  padding: 2rem;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.modal-box h3 { font-size: 20px; }

#panel-admin {
  position: absolute;
  top: 40px; right: 0;
  width: 320px;
  height: calc(100vh - 40px);
  background: #16213e;
  border-left: 1px solid #0f3460;
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #0f3460;
  font-weight: 600;
  font-size: 14px;
}

#admin-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-section {
  background: #0f3460;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-section h4 {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 4px;
}

.joueur-row {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.joueur-row .joueur-nom {
  font-weight: 600;
  font-size: 13px;
  color: #e94560;
}

.joueur-row .joueur-stats {
  color: #aaa;
}

.joueur-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.joueur-actions button {
  font-size: 11px;
  padding: 4px 8px;
}

button.danger {
  background: #c0392b;
  font-size: 13px;
}

button.warning {
  background: #e67e22;
}

.don-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.don-row input {
  width: 80px;
  padding: 4px 8px;
  font-size: 12px;
}