:root {
  --cyan: #00f3ff;
  --cyan-glow: rgba(0, 243, 255, 0.6);
  --pink: #ff0055;
  --pink-glow: rgba(255, 0, 85, 0.6);
  --gold: #ffd600;
  --gold-glow: rgba(255, 214, 0, 0.6);
  --glass: rgba(8, 14, 22, 0.88);
  --glass-border: rgba(0, 243, 255, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  font-family: 'Rajdhani', sans-serif;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #020509;
  color: #fff;
}

.scanlines {
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
              linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 3px, 4px 100%;
  pointer-events: none;
  z-index: 99;
}

#canvas-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#cyber-hud {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 96%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.team-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  padding: 8px 14px;
  border-radius: 8px;
  min-width: 220px;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.team-card.active {
  border-color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
}

.player-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.player-header.reverse {
  flex-direction: row;
  justify-content: flex-end;
}

.avatar-ring {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
  overflow: hidden;
  background: #0d1624;
}

.avatar-ring.rival {
  border-color: var(--pink);
  box-shadow: 0 0 10px var(--pink-glow);
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-info {
  display: flex;
  flex-direction: column;
}

.player-info.right {
  text-align: right;
}

.player-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.player-role {
  font-size: 10px;
  color: var(--gold);
}

.scoreboard {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
}

.score-item {
  flex: 1;
  text-align: center;
}

.score-item .lbl {
  display: block;
  font-size: 8px;
  color: #8fa0b5;
}

.score-item b {
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
}

.score-item.malas b { color: var(--pink); text-shadow: 0 0 8px var(--pink); }
.score-item.neto b { color: var(--cyan); text-shadow: 0 0 8px var(--cyan); }
.score-item.neto small { font-size: 9px; color: #64748b; }

#arena-core {
  text-align: center;
}

#connection-status {
  font-size: 9px;
  font-family: 'Orbitron', sans-serif;
  color: var(--cyan);
  letter-spacing: 2px;
  margin-bottom: 3px;
}

.target-capsule {
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--gold);
  box-shadow: 0 0 15px var(--gold-glow);
  padding: 5px 16px;
  border-radius: 25px;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.4; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

#turn-banner {
  font-size: 11px;
  letter-spacing: 2px;
  color: #94a3b8;
  margin-top: 4px;
}

#laser-gauge-panel {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 280px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.gauge-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 8px;
  color: var(--cyan);
  margin-bottom: 6px;
}

#gauge-container {
  flex: 1;
  width: 14px;
  display: flex;
  justify-content: center;
}

#gauge-track {
  width: 12px;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(0, 243, 255, 0.3);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  touch-action: none;
}

#gauge-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(to top, var(--cyan), var(--gold), var(--pink));
  box-shadow: 0 0 15px var(--cyan);
  position: absolute;
  bottom: 0;
  transition: height 0.05s ease-out;
}

.gauge-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  color: #fff;
  margin-top: 6px;
}

#bottom-bar {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.cyber-btn {
  background: var(--glass);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 6px 14px;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.cyber-btn:hover {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 12px var(--cyan);
}

#cyber-alert {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  pointer-events: none;
  transition: opacity 0.3s;
}

#cyber-alert.hidden {
  opacity: 0;
  display: none;
}

.alert-box {
  background: rgba(8, 12, 20, 0.95);
  border: 2px solid var(--pink);
  box-shadow: 0 0 35px var(--pink-glow);
  padding: 18px 36px;
  border-radius: 8px;
  text-align: center;
}

#alert-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--pink);
  text-shadow: 0 0 10px var(--pink);
}

#alert-desc {
  font-size: 13px;
  color: #fff;
  margin-top: 4px;
}
#hand-ball-ui {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
}

#hand-ball-ui.hidden {
  display: none;
}

#btn-confirmar-blanca {
  background: #00e676;
  color: #000;
  border: 2px solid #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 900;
  padding: 12px 24px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.8);
  animation: pulseBtn 1s infinite alternate;
}

@keyframes pulseBtn {
  from { transform: scale(0.96); box-shadow: 0 0 10px #00e676; }
  to { transform: scale(1.04); box-shadow: 0 0 25px #00e676; }
}
