/* =====================================================================
 * duelo.css
 * Modo Duelo Online: menu, sala de espera (código gigante), header
 * com avatares e timer, telas de revelação de rodada e resultado final.
 * ===================================================================== */

/* ========== DUELO MENU + WAITING ROOM ========== */
.duelo-menu {
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 20px;
  text-align: center;
}
.duelo-menu h2 { color: var(--color-accent); font-size: 1.6rem; }
.duelo-menu .actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 340px;
}

.room-code-display {
  font-size: clamp(2.6rem, 11vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.4rem;
  color: var(--color-accent);
  background: var(--color-surface);
  border: 2px dashed var(--color-accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 12px 0;
  user-select: all;
  -webkit-user-select: all;
  font-family: 'Sora', monospace;
}
.room-code-input {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.3rem;
  text-align: center;
  text-transform: uppercase;
  font-family: 'Sora', monospace;
}
.waiting-pulse {
  color: var(--color-muted);
  font-size: 0.95rem;
  animation: pulse 1.6s ease-in-out infinite;
}

/* ========== DUELO HEADER (durante a partida) ========== */
.duelo-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: var(--color-surface);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.duelo-scores {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.duelo-player {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.duelo-player.right { flex-direction: row-reverse; text-align: right; }

.duelo-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
}
.duelo-avatar.host { background: var(--color-primary); }
.duelo-avatar.guest { background: var(--color-accent); color: #1a1a1a; }

.duelo-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.duelo-score {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent);
}
.duelo-vs {
  font-size: 0.75rem;
  color: var(--color-muted);
  font-weight: 700;
}
.duelo-status {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--color-muted);
}
.status-pulsing { animation: pulse 1.4s ease-in-out infinite; }
.status-done { color: var(--color-success); }

.duelo-timer {
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  padding: 4px 0;
  color: var(--color-text);
}
.duelo-timer.warning {
  color: var(--color-danger);
  animation: pulse 0.8s ease-in-out infinite;
}

/* ========== REVEAL SCREEN ========== */
.reveal-screen {
  align-items: center;
  padding: 16px 20px;
  gap: 14px;
}
.reveal-cards {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 600px;
}
.reveal-card {
  flex: 1;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}
.reveal-card.host { border-top: 3px solid var(--color-primary); }
.reveal-card.guest { border-top: 3px solid var(--color-accent); }
.reveal-card .name { font-size: 0.85rem; font-weight: 700; }
.reveal-card .score {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-accent);
  margin-top: 2px;
}
.reveal-card .dist { font-size: 0.75rem; color: var(--color-muted); }

/* ========== RESULT FINAL ========== */
.winner-banner {
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 800;
  color: var(--color-accent);
  text-align: center;
  padding: 8px 4px;
}

.duelo-final-score {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
}
.duelo-final-score .me { color: var(--color-success); }
.duelo-final-score .opp { color: var(--color-muted); }
.duelo-final-score .x {
  color: var(--color-muted);
  margin: 0 12px;
  font-weight: 400;
}
