/* ============================================================================
   SNITCHIMON — EDITION SCHWARZES BUCH (2D STORY-RPG & MONSTER-BATTLER)
   Stylesheet für Bruderschaft.fun
   ============================================================================ */

#snitchimon-game-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 620px;
  background: #080a10;
  overflow: hidden;
  user-select: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
}

/* --- MINI TOP TOAST (Klein & nur ganz oben!) --- */
.smon-toast-top {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  pointer-events: none;
}

.smon-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);
}

/* --- OVERWORLD CANVAS --- */
.smon-viewport {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  background: #0b0e17;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.smon-viewport canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  image-rendering: pixelated;
}

/* --- TOP HUD BAR (Gebiet, Orden, Team-Status, Markt/Heilen/Dex Buttons) --- */
.smon-hud-top {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 20;
  gap: 10px;
  flex-wrap: wrap;
}

.smon-zone-card {
  background: rgba(12, 15, 24, 0.9);
  border: 1.5px solid #d4af37;
  border-left: 4px solid #ff6b00;
  border-radius: 10px;
  padding: 6px 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
  pointer-events: auto;
}

.smon-zone-name {
  font-family: 'Cinzel', serif;
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffd700;
}

.smon-quest-hint {
  font-size: 0.72rem;
  color: #cbd5e1;
  margin-top: 2px;
}

.smon-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  flex-wrap: wrap;
}

.smon-hud-pill {
  background: rgba(12, 15, 24, 0.92);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.smon-hud-btn {
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.22), rgba(212, 175, 55, 0.2));
  border: 1px solid #ffd700;
  color: #ffd700;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.smon-hud-btn:hover {
  background: #ffd700;
  color: #080a10;
}

/* --- PARTY QUICK BAR (Unten links auf der Karte) --- */
.smon-party-bar {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: flex;
  gap: 6px;
  z-index: 20;
  pointer-events: auto;
  flex-wrap: wrap;
}

.smon-party-slot {
  background: rgba(12, 15, 24, 0.92);
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: 8px;
  padding: 5px 9px;
  min-width: 112px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.15s;
}

.smon-party-slot.lead {
  border-color: #ff6b00;
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.35);
}

.smon-party-slot:hover {
  transform: translateY(-2px);
  border-color: #ffd700;
}

.smon-mini-hp-bg {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 2px;
}

.smon-mini-hp-fill {
  height: 100%;
  background: #22c55e;
  transition: width 0.2s;
}

/* --- MOBILE D-PAD & ACTION BUTTONS (Unten rechts) --- */
.smon-controls-pad {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  z-index: 20;
  pointer-events: auto;
}

.smon-dpad {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  grid-template-rows: repeat(3, 36px);
  gap: 3px;
}

.smon-dpad-btn {
  background: rgba(15, 19, 30, 0.88);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #ffd700;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.smon-dpad-btn:active {
  background: #ff6b00;
  color: #fff;
}

.smon-interact-btn {
  background: linear-gradient(135deg, #ff7b00, #d94600);
  border: 2px solid #ffd000;
  color: #fff;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 0.78rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 107, 0, 0.5);
}

/* --- RPG DIALOG BOX (Klassischer Pokémon-Textkasten unten) --- */
.smon-dialog-box {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 720px;
  background: linear-gradient(180deg, #141926 0%, #0b0e17 100%);
  border: 3px solid #ffd700;
  border-radius: 14px;
  padding: 14px 20px;
  z-index: 45;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.92);
  display: none;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.smon-dialog-box.active {
  display: flex;
}

.smon-dialog-speaker {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: #ff9e44;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.smon-dialog-text {
  font-size: 0.92rem;
  color: #f8fafc;
  line-height: 1.5;
  min-height: 42px;
}

.smon-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============================================================================
   POKÉMON TURN-BASED BATTLE SCREEN OVERLAY
   ============================================================================ */
.smon-battle-screen {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #1a2436 0%, #263829 58%, #111520 58%, #0a0c14 100%);
  z-index: 50;
  display: none;
  flex-direction: column;
  justify-content: space-between;
}

.smon-battle-screen.active {
  display: flex;
}

.smon-battle-arena {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
}

/* Gegner Status-Box (Oben links) */
.smon-status-card {
  position: absolute;
  background: rgba(12, 16, 26, 0.94);
  border: 2px solid #d4af37;
  border-radius: 12px;
  padding: 10px 14px;
  width: 265px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75);
}

.smon-status-enemy {
  top: 22px;
  left: 24px;
}

.smon-status-player {
  bottom: 22px;
  right: 24px;
  border-color: #ff6b00;
}

.smon-status-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
}

.smon-lvl-tag {
  font-family: 'Cinzel', serif;
  color: #ffd700;
  font-size: 0.82rem;
}

.smon-type-badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 99px;
  margin: 3px 0 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.smon-hp-bar-outer {
  width: 100%;
  height: 10px;
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  overflow: hidden;
}

.smon-hp-bar-inner {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  transition: width 0.35s ease, background 0.35s ease;
}

.smon-hp-numbers {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 4px;
  font-weight: 700;
}

/* Kampfschauplatz-Plattformen & Sprites */
.smon-platform-enemy {
  position: absolute;
  top: 65px;
  right: 75px;
  width: 190px;
  height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.smon-platform-player {
  position: absolute;
  bottom: 18px;
  left: 75px;
  width: 190px;
  height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.smon-ground-disc {
  width: 165px;
  height: 46px;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.45) 0%, rgba(16, 24, 20, 0.8) 70%, transparent 100%);
  border-radius: 50%;
  transform: translateY(-18px);
  z-index: 1;
}

.smon-sprite-canvas {
  width: 136px;
  height: 136px;
  image-rendering: pixelated;
  z-index: 2;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.75));
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.smon-sprite-canvas.hit-shake {
  animation: smonShake 0.35s ease;
}

@keyframes smonShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-12px) scale(0.95); filter: brightness(2); }
  75% { transform: translateX(12px) scale(0.95); }
}

/* Kampf-Kommando-Konsole unten */
.smon-battle-console {
  background: #0d111c;
  border-top: 3px solid #ffd700;
  padding: 14px 20px;
  min-height: 168px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.smon-battle-log {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.45;
}

.smon-battle-menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.smon-cmd-btn {
  background: linear-gradient(145deg, #1b2234, #101522);
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  color: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: 'Cinzel', serif;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.smon-cmd-btn:hover:not(:disabled) {
  border-color: #ff6b00;
  background: rgba(255, 107, 0, 0.22);
  transform: translateY(-1px);
}

.smon-cmd-btn small {
  font-family: 'Inter', sans-serif;
  font-size: 0.66rem;
  color: #9ca3af;
  font-weight: 600;
}

/* --- STARTER SELECTION / SHOP / SNITCHI-DEX MODAL --- */
.smon-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 12, 0.9);
  backdrop-filter: blur(8px);
  z-index: 65;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.smon-modal-overlay.active {
  display: flex;
}

.smon-modal-card {
  background: linear-gradient(160deg, #161b2a 0%, #0b0e17 100%);
  border: 2px solid #ffd700;
  border-radius: 16px;
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px 26px;
  box-shadow: 0 25px 75px rgba(0, 0, 0, 0.95);
}

.smon-starter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.smon-starter-card {
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(212, 175, 55, 0.35);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.smon-starter-card:hover {
  border-color: #ff6b00;
  background: rgba(255, 107, 0, 0.14);
  transform: translateY(-4px);
}

@media (max-width: 768px) {
  .smon-battle-console {
    grid-template-columns: 1fr;
  }
  .smon-platform-enemy {
    right: 20px;
    top: 85px;
  }
  .smon-platform-player {
    left: 20px;
  }
}
