/* ============================================================================
   SNITCH.IO — DAS SCHWARZE LOCH DER KASERNE (HOLE.IO 3D MULTIPLAYER)
   Stylesheet für Bruderschaft.fun
   ============================================================================ */

#snitch-io-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 620px;
  background: #07090f;
  overflow: hidden;
  user-select: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f3f4f6;
}

#snitch-io-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
  cursor: crosshair;
}

/* --- MINI TOP TOAST (Klein & nur ganz oben!) --- */
.sio-toast-top {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sio-toast-pill {
  background: rgba(12, 15, 24, 0.94);
  border: 1px solid #ffd700;
  border-left: 3px solid #ff6b00;
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
}

/* --- HUD LAYER --- */
.sio-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 18px;
}

.sio-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

/* Left: Hole Tier & Size Progress */
.sio-tier-card {
  background: rgba(12, 15, 24, 0.88);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-left: 3px solid #ff6b00;
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 225px;
  max-width: 265px;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.sio-tier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #ff9e44;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sio-tier-title {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin: 2px 0 5px;
}

.sio-bar-bg {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
}

.sio-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff6b00, #ffd700);
  transition: width 0.2s ease;
}

.sio-tier-sub {
  font-size: 0.68rem;
  color: #9ca3af;
  margin-top: 4px;
}

.sio-powerup-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.sio-powerup-badge {
  background: rgba(255, 107, 0, 0.22);
  border: 1px solid #ff6b00;
  color: #ffd700;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Center: Timer & Kaserne Clear % */
.sio-center-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 22px;
}

.sio-timer-box {
  background: rgba(11, 14, 22, 0.92);
  border: 1.5px solid #ffd700;
  border-radius: 999px;
  padding: 5px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

.sio-timer-val {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffd700;
}

.sio-clear-pill {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 700;
}

/* Right: Live Multiplayer Leaderboard */
.sio-leaderboard {
  background: rgba(11, 14, 22, 0.88);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 220px;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
}

.sio-lb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffd700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 4px;
  margin-bottom: 5px;
}

.sio-lb-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sio-lb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.73rem;
  padding: 2px 6px;
  border-radius: 4px;
  color: #cbd5e1;
}

.sio-lb-row.is-me {
  background: rgba(255, 107, 0, 0.25);
  border: 1px solid rgba(255, 107, 0, 0.6);
  color: #fff;
  font-weight: 800;
}

.sio-lb-row.is-dead {
  opacity: 0.4;
  text-decoration: line-through;
}

.sio-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  margin-right: 4px;
}

/* Bottom Bar */
.sio-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.sio-controls-hint {
  background: rgba(11, 14, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.72rem;
  color: #9ca3af;
}

.sio-controls-hint b {
  color: #ffd700;
}

.sio-action-btns {
  display: flex;
  gap: 8px;
  pointer-events: auto;
  flex-wrap: wrap;
}

.sio-btn {
  background: rgba(16, 20, 32, 0.92);
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: #ffd700;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sio-btn:hover {
  background: #ffd700;
  color: #07090f;
  transform: translateY(-1px);
}

.sio-btn-primary {
  background: linear-gradient(135deg, #ff7b00 0%, #d94600 100%);
  border: 2px solid #ffd000;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 26px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 107, 0, 0.5);
  transition: all 0.18s ease;
}

.sio-btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 30px rgba(255, 107, 0, 0.75);
}

/* --- FLOATING 3D NAMETAGS & POPUPS --- */
.sio-world-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 12;
  overflow: hidden;
}

.sio-hole-label {
  position: absolute;
  transform: translate(-50%, -100%);
  background: rgba(10, 12, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}

.sio-hole-label.is-me {
  border-color: #ffd700;
  color: #ffd700;
  font-size: 0.74rem;
}

.sio-float-score {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 0.85rem;
  color: #ffd700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  pointer-events: none;
  animation: sioFloatUp 0.85s ease-out forwards;
}

@keyframes sioFloatUp {
  0% { opacity: 1; transform: translate(-50%, 0) scale(0.9); }
  100% { opacity: 0; transform: translate(-50%, -34px) scale(1.15); }
}

/* --- LOBBY / UPGRADE / END-OF-ROUND OVERLAY --- */
.sio-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(14, 18, 30, 0.86) 0%, rgba(5, 7, 12, 0.95) 100%);
  backdrop-filter: blur(8px);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.sio-overlay.hidden {
  display: none;
}

.sio-card {
  background: linear-gradient(160deg, #151928 0%, #0a0d14 100%);
  border: 2px solid #d4af37;
  border-radius: 16px;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 26px;
  box-shadow: 0 25px 75px rgba(0, 0, 0, 0.95);
}

.sio-mode-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0 16px;
}

.sio-mode-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(212, 175, 55, 0.28);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
}

.sio-mode-card.active {
  background: rgba(255, 107, 0, 0.18);
  border-color: #ff6b00;
  box-shadow: 0 0 18px rgba(255, 107, 0, 0.3);
}

.sio-mode-card h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.86rem;
  color: #ffd700;
  margin: 0 0 4px;
}

.sio-mode-card p {
  font-size: 0.72rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.35;
}

.sio-form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.sio-input-group {
  flex: 1;
  min-width: 180px;
}

.sio-input-group label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 4px;
  font-weight: 700;
}

.sio-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.sio-skin-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sio-skin-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sio-skin-pill.active {
  border-color: #ffd700;
  background: rgba(212, 175, 55, 0.2);
  color: #ffd700;
}

.sio-upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.sio-upg-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.sio-upg-btn {
  background: linear-gradient(135deg, #d4af37, #b48608);
  color: #07090f;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.sio-upg-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: #6b7280;
  cursor: not-allowed;
}

/* --- MULTIPLAYER WAITING LOBBY & 5s COUNTDOWN --- */
.sio-mp-waiting-box {
  background: rgba(8, 12, 22, 0.92);
  border: 2px solid #22c55e;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.sio-mp-player-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.sio-mp-player-chip {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.5);
  color: #f8fafc;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sio-mp-player-chip.is-self {
  border-color: #ffd700;
  background: rgba(212, 175, 55, 0.2);
  color: #ffd700;
}

.sio-countdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: rgba(5, 8, 15, 0.78);
  backdrop-filter: blur(5px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  text-align: center;
}

.sio-countdown-overlay.active {
  display: flex;
}

.sio-countdown-number {
  font-family: 'Cinzel', serif;
  font-size: 6.5rem;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 40px rgba(255, 107, 0, 0.95), 0 6px 20px #000;
  line-height: 1;
  margin: 10px 0;
}

@media (max-width: 768px) {
  .sio-mode-selector {
    grid-template-columns: 1fr;
  }
}
