/* ══════════════════════════════════════════════════════════════
   COMMUNITY — XP, Votos, Perfil
   ══════════════════════════════════════════════════════════════ */

/* ── Chip de usuario: XP y racha ─────────────────────────────── */
.auth-chip-xp {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .04em;
  padding: 0 6px;
  border-left: 1px solid var(--border-2);
}
.auth-chip-racha {
  font-size: 11px;
  padding: 0 2px;
}

/* ── Toast de XP (extiende el rm-toast existente) ────────────── */
.rm-toast-show {
  display: block !important;
  animation: toastIn .3s ease;
}
.rm-toast-xp    { background: #1e3a1e; border-color: #4ade80; color: #4ade80; }
.rm-toast-gold  { background: #3b2e00; border-color: var(--gold); color: var(--gold); }
.rm-toast-warn  { background: #3b1a1a; border-color: #ef4444; color: #f87171; }
.rm-toast-racha { background: #3b2200; border-color: #fb923c; color: #fdba74; }
.rm-toast-info  { background: var(--surface-2); border-color: var(--border-2); color: var(--text); }

/* ── Termómetro del jugador ──────────────────────────────────── */
@keyframes picoIn {
  0%   { transform: scale(.92) translateY(5px); }
  70%  { transform: scale(1.02) translateY(-1px); }
  100% { transform: scale(1) translateY(0); }
}
.pdo-termometro {
  padding: 10px 0 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.pdo-termo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}
.pdo-voto-btn {
  background: none;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--muted);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: color .15s, border-color .15s, background .15s;
  flex-shrink: 0;
}
.pdo-voto-btn:hover { color: var(--text); border-color: var(--border); }
.pdo-voto-up.pdo-voto-active   { color: #4ade80; border-color: #4ade80; background: rgba(74,222,128,.08); }
.pdo-voto-down.pdo-voto-active { color: #f87171; border-color: #f87171; background: rgba(248,113,113,.08); }
.pdo-termo-wrap {
  flex: 1;
  position: relative;
  height: 20px;
  background: var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.pdo-termo-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #ef4444 0%, #facc15 50%, #4ade80 100%);
  transition: width .4s ease;
}
.pdo-termo-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
  letter-spacing: .06em;
}
.pdo-termo-hint {
  font-size: 9px;
  color: var(--muted);
  text-align: center;
  margin: 4px 0 0;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.pdo-termo-loading { font-size: 11px; color: var(--muted); text-align: center; padding: 8px; }

/* ── Votos en comentarios ────────────────────────────────────── */
.pdo-comment-votes {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.pdo-cvoto {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  transition: color .15s, background .15s;
  line-height: 1;
}
.pdo-cvoto:hover        { background: var(--surface-2); color: var(--text); }
.pdo-cvoto.up.active    { color: #4ade80; }
.pdo-cvoto.down.active  { color: #f87171; }
.pdo-cvoto-score {
  font-size: 10px;
  min-width: 18px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

/* ── VIP en comentarios ──────────────────────────────────────── */
.pdo-comment-vip { color: var(--gold) !important; }
.vip-check {
  font-size: 9px;
  color: var(--gold);
  background: rgba(245,200,0,.15);
  border: 1px solid rgba(245,200,0,.3);
  border-radius: 3px;
  padding: 0 3px;
  margin-left: 2px;
}
.pdo-comment-body-vip { color: #fde68a; }

/* ── Modal de Perfil ─────────────────────────────────────────── */
.prof-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,.75);
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.prof-modal.prof-open { display: flex; }

.prof-inner {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 360px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  animation: pdoIn .28s cubic-bezier(.23,1,.32,1);
}

.prof-close {
  position: absolute;
  top: 12px; right: 12px;
  background: none;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  width: 28px; height: 28px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, border-color .15s;
}
.prof-close:hover { color: var(--negative); border-color: var(--negative); }

.prof-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  position: relative;
  border: 2px solid var(--border-2);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  flex-shrink: 0;
}
.prof-vip-badge {
  position: absolute;
  bottom: -2px; right: -2px;
  background: var(--gold);
  color: #000;
  font-size: 9px;
  font-weight: 900;
  border-radius: 50%;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}

.prof-nick {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .06em;
  color: var(--text);
}
.prof-nick-vip { color: var(--gold); }

.prof-rango {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
}
.prof-rango-icon  { font-size: 14px; }
.prof-rango-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
}

.prof-xp-wrap { width: 100%; }
.prof-xp-bar {
  width: 100%;
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.prof-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 3px;
  transition: width .6s ease;
}
.prof-xp-nums {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 10px;
  color: var(--muted);
}
.prof-xp-next { text-align: right; }

.prof-stats {
  display: flex;
  gap: 24px;
}
.prof-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.prof-stat-val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
}
.prof-stat-key {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.prof-racha-warn {
  font-size: 11px;
  color: #fdba74;
  background: rgba(251,146,60,.1);
  border: 1px solid rgba(251,146,60,.3);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  text-align: center;
  width: 100%;
}

.prof-medals-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  align-self: flex-start;
  margin-top: 4px;
}
.prof-medals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.prof-medal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  min-width: 70px;
}
.prof-medal.got    { border-color: var(--gold-dim); background: rgba(245,200,0,.06); }
.prof-medal.locked { opacity: .45; filter: grayscale(1); }
.prof-medal-icon   { font-size: 20px; }
.prof-medal-name   { font-size: 9px; color: var(--muted); text-align: center; }
.prof-no-medals    { font-size: 12px; color: var(--muted); font-style: italic; }

.prof-avatar-picker { width: 100%; }
.prof-av-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 8px;
}
.prof-av-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.prof-av-opt {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid transparent;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, transform .15s;
}
.prof-av-opt:hover    { transform: scale(1.1); }
.prof-av-opt.selected { border-color: var(--gold); box-shadow: 0 0 8px rgba(245,200,0,.4); }

/* Cursor pointer en el chip para abrir perfil */
.auth-user-chip { cursor: pointer; }

@media (max-width: 600px) {
  .prof-inner  { padding: 20px 14px 24px; }
  .prof-av-opt { width: 34px; height: 34px; font-size: 14px; }
}
