/* Extra styles for new games and admin panel */

/* ===== ADMIN ===== */
.admin-section {
  width: 100%; max-width: 500px;
  background: rgba(0,0,0,0.5);
  border: 2px solid rgba(0,255,240,0.3);
  border-radius: 16px;
  padding: 16px;
  margin: 10px 0;
}
.admin-section h2 {
  font-size: 18px;
  color: #00fff0;
  margin-bottom: 12px;
  text-shadow: 0 0 8px #00fff0;
}
.fighter-slots {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.fighter-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}
.slot-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ff66cc;
}
.photo-preview-wrap {
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 3px solid #00fff0;
  box-shadow: 0 0 20px rgba(0,255,240,0.5);
  overflow: hidden;
  position: relative;
  background: #1a0040;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-preview-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: none;
}
.photo-empty {
  font-size: 36px;
  color: #b380ff;
  opacity: 0.6;
}
.vs-label {
  font-size: 32px; font-weight: 900;
  background: linear-gradient(135deg, #ff00aa, #ffd700);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.upload-btn {
  background: linear-gradient(135deg, #ff00aa, #00fff0);
  color: #050010;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 1px;
  border: none;
  display: inline-block;
}
.upload-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.upload-row .input-name {
  width: 180px;
  margin: 4px;
}
.photos-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin: 12px 0;
  max-width: 100%;
}
.photo-item {
  position: relative;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(0,255,240,0.3);
  border-radius: 8px;
  padding: 4px;
}
.photo-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}
.photo-label {
  font-size: 10px;
  margin-top: 4px;
  color: #00fff0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photo-del {
  position: absolute;
  top: -6px; right: -6px;
  background: #ff4477;
  color: #fff;
  border: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255,68,119,0.5);
}

/* ===== REACTION ===== */
.react-target {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(0,255,240,0.4), rgba(0,255,240,0.1));
  border: 2px solid #00fff0;
  box-shadow: 0 0 25px rgba(0,255,240,0.7);
  cursor: pointer;
  transition: transform 0.05s;
  user-select: none;
}
.react-target.trap {
  background: radial-gradient(circle at 30% 30%, rgba(255,68,119,0.4), rgba(255,68,119,0.1));
  border-color: #ff4477;
  box-shadow: 0 0 25px rgba(255,68,119,0.7);
}
.react-target:active { transform: scale(0.9); }
.react-target.hit-good {
  animation: targetHit 0.3s ease-out;
  background: radial-gradient(circle at 30% 30%, #66ff99, #009933);
  border-color: #66ff99;
  box-shadow: 0 0 30px #66ff99;
}
.react-target.hit-trap {
  animation: targetHit 0.3s ease-out;
  background: radial-gradient(circle at 30% 30%, #ff4477, #aa0033);
}
@keyframes targetHit {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(0); opacity: 0; }
}
#react-flash {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(28px, 8vw, 48px);
  font-weight: 900;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  text-shadow: 0 0 25px currentColor;
}
#react-flash.show { animation: pop 0.6s ease-out forwards; }

/* ===== MAZE ===== */
#maze-canvas {
  background: #050010;
  border: 2px solid #00fff0;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0,255,240,0.4);
  touch-action: none;
}
.dpad {
  display: grid;
  grid-template-columns: 60px 60px 60px;
  grid-template-rows: 60px 60px 60px;
  gap: 4px;
  margin-top: 8px;
}
.dpad > div { background: transparent; }
.dpad-btn {
  background: linear-gradient(135deg, #ff00aa, #00fff0);
  color: #050010;
  border: none;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0,255,240,0.5), 0 3px 0 #006666;
  transition: transform 0.05s;
}
.dpad-btn:active {
  transform: translateY(2px);
  box-shadow: 0 0 15px rgba(0,255,240,0.5), 0 1px 0 #006666;
}

/* ===== FIGHT ===== */
#fight-hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 8px 12px;
  z-index: 11;
  background: rgba(5,0,16,0.85);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fight-bar-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hp-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #00fff0;
}
.hp-name {
  font-size: 14px;
  letter-spacing: 1px;
  text-shadow: 0 0 6px currentColor;
}
.weapon-slot {
  font-size: 22px;
  min-width: 28px;
  text-align: center;
  filter: drop-shadow(0 0 6px currentColor);
}
.hp-bar {
  height: 14px;
  background: rgba(0,0,0,0.5);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
  position: relative;
}
.hp-bar-fill {
  height: 100%;
  transition: width 0.25s ease-out;
  border-radius: 10px;
}
.hp-bar-fill.p1 {
  background: linear-gradient(90deg, #66ff99, #00fff0);
  box-shadow: 0 0 10px #00fff0 inset;
}
.hp-bar-fill.p2 {
  background: linear-gradient(90deg, #ff00aa, #ff4477);
  box-shadow: 0 0 10px #ff4477 inset;
  float: right;
}
.hp-bar.reverse { direction: rtl; }
.hp-bar.reverse .hp-bar-fill { direction: ltr; float: right; }
.fight-timer {
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 10px #ffd700;
}
#fight-canvas {
  background: #1a0040;
  border: 2px solid #ff00aa;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(255,0,170,0.5);
  touch-action: none;
}
.fight-controls {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 800px;
  padding: 0 12px;
  gap: 16px;
}
.fight-pad-left, .fight-pad-right {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ctrl-btn {
  background: linear-gradient(135deg, #1a0040, #4d0080);
  color: #00fff0;
  border: 2px solid #00fff0;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0,255,240,0.4), 0 3px 0 #003344;
  transition: transform 0.05s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ctrl-btn.jump {
  border-color: #ffd700;
  color: #ffd700;
  box-shadow: 0 0 15px rgba(255,215,0,0.4), 0 3px 0 #806600;
  font-size: 11px;
  width: 70px;
  border-radius: 28px;
}
.ctrl-btn.punch {
  border-color: #ff66cc;
  color: #ff66cc;
  box-shadow: 0 0 15px rgba(255,102,204,0.4), 0 3px 0 #663355;
}
.ctrl-btn.kick {
  border-color: #66ff99;
  color: #66ff99;
  box-shadow: 0 0 15px rgba(102,255,153,0.4), 0 3px 0 #225533;
}
.ctrl-btn.special {
  border-color: #ff4477;
  color: #ff4477;
  box-shadow: 0 0 20px rgba(255,68,119,0.6), 0 3px 0 #661122;
  animation: specialPulse 1.5s ease-in-out infinite;
}
@keyframes specialPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(255,68,119,0.4), 0 3px 0 #661122; }
  50% { box-shadow: 0 0 28px rgba(255,68,119,0.9), 0 3px 0 #661122; }
}
.ctrl-btn:active {
  transform: translateY(2px);
}

@media (max-width: 480px) {
  .ctrl-btn { width: 48px; height: 48px; font-size: 18px; }
  .ctrl-btn.jump { width: 60px; font-size: 10px; }
}

/* Player photo capture on the profile screen */
.player-photo-row{display:flex;align-items:center;justify-content:center;gap:12px;margin:10px 0 14px;flex-wrap:wrap}
.player-photo-preview{width:82px;height:82px;border:2px solid #00fff0;border-radius:50%;display:grid;place-items:center;background:#050010;box-shadow:0 0 18px rgba(0,255,240,.35);font-size:30px;overflow:hidden}
.player-photo-preview img,.hub-profile-photo img{width:100%;height:100%;object-fit:cover;display:block}
.photo-capture-btn{cursor:pointer;line-height:1.2;text-align:center}
.hub-profile-photo{width:86px;height:86px;border:2px solid #ff00aa;border-radius:50%;overflow:hidden;margin:8px auto 14px;box-shadow:0 0 22px rgba(255,0,170,.45)}
