@import "tailwindcss";

@theme {
  --color-rpg-bg: #0d0f14;
  --color-rpg-surface: #161b25;
  --color-rpg-border: #2a3448;
  --color-rpg-gold: #f4c94e;
  --color-rpg-gold-dim: #c49c2e;
  --color-rpg-red: #e84040;
  --color-rpg-green: #3ddc84;
  --color-rpg-blue: #5ba4f5;
  --color-rpg-purple: #a78bfa;
  --color-rpg-text: #dce4f0;
  --color-rpg-muted: #6b7a99;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: #0d0f14;
  color: #dce4f0;
  font-family: system-ui, sans-serif;
  min-height: 100vh;
}

#root { min-height: 100vh; }

/* Barres */
.bar-track { background: #1e2535; border-radius: 4px; overflow: hidden; height: 10px; }
.bar-fill-hp  { background: linear-gradient(90deg, #c0392b, #e84040); height: 100%; transition: width 0.4s ease; }
.bar-fill-end { background: linear-gradient(90deg, #1d6fa4, #5ba4f5); height: 100%; transition: width 0.4s ease; }
.bar-fill-xp  { background: linear-gradient(90deg, #7c3aed, #a78bfa); height: 100%; transition: width 0.4s ease; }

/* Cards */
.card { background: #161b25; border: 1px solid #2a3448; border-radius: 8px; padding: 1rem; }
.card-gold { border-color: #c49c2e; }
.card-hover { cursor: pointer; transition: border-color 0.2s; }
.card-hover:hover { border-color: #f4c94e; }

/* Boutons */
.btn { font-weight: 600; padding: 0.5rem 1.25rem; border-radius: 6px; border: none; cursor: pointer; transition: opacity 0.2s; font-size: 0.875rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-gold { background: linear-gradient(135deg, #c49c2e, #f4c94e); color: #0d0f14; }
.btn-gold:hover:not(:disabled) { opacity: 0.85; }
.btn-red { background: linear-gradient(135deg, #c0392b, #e84040); color: #fff; }
.btn-red:hover:not(:disabled) { opacity: 0.85; }
.btn-ghost { background: #1e2535; color: #dce4f0; border: 1px solid #2a3448; }
.btn-ghost:hover:not(:disabled) { background: #2a3448; }
.btn-blue { background: linear-gradient(135deg, #1d6fa4, #5ba4f5); color: #fff; }
.btn-blue:hover:not(:disabled) { opacity: 0.85; }

/* Rareté */
.rarity-common    { color: #9ca3af; }
.rarity-rare      { color: #5ba4f5; }
.rarity-epic      { color: #a78bfa; }
.rarity-legendary { color: #f4c94e; }

/* Badge */
.badge { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-green { background: #0d2a1a; color: #3ddc84; border: 1px solid #1a5c35; }
.badge-red   { background: #2a0d0d; color: #e84040; border: 1px solid #5c1a1a; }
.badge-gold  { background: #2a1f0d; color: #f4c94e; border: 1px solid #5c420d; }
.badge-blue  { background: #0d1a2a; color: #5ba4f5; border: 1px solid #1a3f5c; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0d0f14; }
::-webkit-scrollbar-thumb { background: #2a3448; border-radius: 3px; }

/* Séparateur */
.divider { border: none; border-top: 1px solid #2a3448; margin: 1rem 0; }

/* Input */
.input-rpg {
  background: #1e2535;
  border: 1px solid #2a3448;
  color: #dce4f0;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
.input-rpg:focus { border-color: #f4c94e; }
.input-rpg::placeholder { color: #6b7a99; }

/* Combat log */
.combat-log { background: #0d0f14; border: 1px solid #2a3448; border-radius: 6px; padding: 0.75rem; max-height: 260px; overflow-y: auto; font-size: 0.8rem; font-family: monospace; }
.log-player { color: #3ddc84; }
.log-monster { color: #e84040; }
.log-system  { color: #f4c94e; }
.log-crit    { color: #a78bfa; font-weight: bold; }
