/* ==========================================================================
   PokeRadar Modern Design System & Styles
   ========================================================================== */

:root {
  --font-main: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Colors */
  --bg-dark: #0b0f19;
  --bg-surface: #141b2d;
  --bg-surface-elevated: #1e2942;
  --bg-glass: rgba(20, 27, 45, 0.82);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.06);

  /* Primary Accent: Poké-Red & Electric Neon */
  --accent-red: #ff385c;
  --accent-blue: #00d2ff;
  --accent-gold: #ffbe0b;
  --accent-green: #00e676;
  --accent-purple: #9d4edd;

  /* Text colors */
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* IV Ranks */
  --iv-hundo: #ff0055;
  --iv-high: #ff9100;
  --iv-mid: #00e676;
  --iv-low: #64748b;

  /* Element Types Colors */
  --type-normal: #a8a878;
  --type-fire: #f08030;
  --type-water: #6890f0;
  --type-grass: #78c850;
  --type-electric: #f8d030;
  --type-ice: #98d8d8;
  --type-fighting: #c03028;
  --type-poison: #a040a0;
  --type-ground: #e0c068;
  --type-flying: #a890f0;
  --type-psychic: #f85888;
  --type-bug: #a8b820;
  --type-rock: #b8a038;
  --type-ghost: #705898;
  --type-dragon: #7038f8;
  --type-steel: #b8b8d0;
  --type-dark: #705848;
  --type-fairy: #ee99ac;

  /* UI transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(0, 210, 255, 0.35);
}

/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header & Brand
   ========================================================================== */
.app-header {
  height: 64px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  flex-shrink: 0;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Animated Pokéball icon */
.pokeball-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(255, 56, 92, 0.5);
  animation: pulse-glow 3s infinite alternate;
}

.pokeball-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(135deg, #ff385c, #d90429);
  border-bottom: 2px solid #141b2d;
}

.pokeball-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: #ffffff;
}

.pokeball-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #ffffff;
  border: 2px solid #141b2d;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 2px #ffffff;
}

.brand h1 {
  font-family: var(--font-main);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-live {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(0, 230, 118, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.3);
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
}

.badge-live::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  margin-right: 4px;
  animation: blink 1.2s infinite;
}

.subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.subtitle strong {
  color: var(--accent-blue);
}

/* Header Statistics & Actions */
.header-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Permanent Root Scanner Status Pill */
.stat-root-pill {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.35);
  color: #00e676;
  cursor: pointer;
  transition: var(--transition-fast);
}

.stat-root-pill:hover {
  background: rgba(0, 230, 118, 0.22);
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.3);
  transform: translateY(-1px);
}

.stat-dot-green {
  background: #00e676 !important;
  box-shadow: 0 0 8px #00e676 !important;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue);
}

.stat-hundo {
  background: rgba(255, 0, 85, 0.12);
  border-color: rgba(255, 0, 85, 0.3);
  color: #ff3377;
}

.icon-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

.icon-btn.active {
  color: var(--accent-blue);
}

.btn-filters-toggle {
  width: auto;
  padding: 0 14px;
  font-weight: 600;
  font-size: 0.85rem;
  background: linear-gradient(135deg, #1e2942, #141b2d);
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: var(--accent-blue);
  gap: 6px;
}

.btn-filters-toggle:hover {
  background: linear-gradient(135deg, #263554, #1a233a);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.25);
}

/* ==========================================================================
   Main Layout & Map
   ========================================================================== */
.main-layout {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
}

.map-container {
  width: 100%;
  height: 100%;
  background: #0b0f19;
  z-index: 1;
}

/* Dark mode Leaflet tile adjustment */
.leaflet-tile {
  filter: brightness(0.7) invert(1) contrast(3) hue-rotate(200deg) saturate(0.35);
}

/* Floating Status Overlay */
.map-overlay-controls {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 360px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

/* Location Search Box */
.location-search-card {
  pointer-events: auto;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
}

.loc-search-icon {
  font-size: 1rem;
}

.location-search-card input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-body);
}

.location-search-card input::placeholder {
  color: var(--text-muted);
}

.btn-loc-search {
  background: var(--accent-blue);
  color: #0b0f19;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-loc-search:hover {
  background: #ffffff;
}

.radar-status-card {
  pointer-events: auto;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-lg);
}

.radar-pulse-ring {
  width: 14px;
  height: 14px;
  background: var(--accent-blue);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.radar-pulse-ring::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 2px solid var(--accent-blue);
  border-radius: 50%;
  animation: ripple 1.6s ease-out infinite;
}

.radar-status-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.radar-title {
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radar-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radar-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-gps-card {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.4);
  color: var(--accent-green);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-gps-card:hover {
  background: rgba(0, 230, 118, 0.3);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}

.btn-rescan {
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.4);
  color: var(--accent-blue);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-rescan:hover {
  background: rgba(0, 210, 255, 0.25);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.map-hint {
  font-size: 0.75rem;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  width: fit-content;
}

/* ==========================================================================
   Filter Panel / Sidebar
   ========================================================================== */
.filter-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-glass);
  z-index: 1050;
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
}

.filter-panel.open {
  transform: translateX(0);
}

.filter-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-header h2 {
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  color: var(--text-primary);
}

.filter-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* Search Box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.9rem;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  padding: 10px 36px 10px 36px;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.btn-clear-search {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
}

.btn-clear-search.visible {
  display: block;
}

/* IV Presets */
.iv-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preset-btn {
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.preset-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.preset-btn.active {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  font-weight: 700;
}

.preset-btn.hundo-preset.active {
  background: rgba(255, 0, 85, 0.18);
  border-color: #ff0055;
  color: #ff3377;
}

/* Sliders */
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-value {
  font-weight: 700;
  color: var(--accent-blue);
  font-size: 0.9rem;
}

.custom-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #1e2942;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent-blue);
  border: 2px solid #ffffff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
  transition: transform var(--transition-fast);
}

.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.helper-text {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Types Grid */
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.type-actions {
  display: flex;
  gap: 10px;
}

.text-link {
  background: transparent;
  border: none;
  color: var(--accent-blue);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.text-link:hover {
  text-decoration: underline;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.type-pill {
  padding: 6px 4px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  user-select: none;
  opacity: 0.35;
  filter: grayscale(0.6);
}

.type-pill.active {
  opacity: 1;
  filter: grayscale(0);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

/* Individual Type Colors */
.type-pill[data-type="normal"] { background: var(--type-normal); }
.type-pill[data-type="fire"] { background: var(--type-fire); }
.type-pill[data-type="water"] { background: var(--type-water); }
.type-pill[data-type="grass"] { background: var(--type-grass); }
.type-pill[data-type="electric"] { background: var(--type-electric); color: #222; text-shadow: none; }
.type-pill[data-type="ice"] { background: var(--type-ice); color: #222; text-shadow: none; }
.type-pill[data-type="fighting"] { background: var(--type-fighting); }
.type-pill[data-type="poison"] { background: var(--type-poison); }
.type-pill[data-type="ground"] { background: var(--type-ground); }
.type-pill[data-type="flying"] { background: var(--type-flying); }
.type-pill[data-type="psychic"] { background: var(--type-psychic); }
.type-pill[data-type="bug"] { background: var(--type-bug); }
.type-pill[data-type="rock"] { background: var(--type-rock); }
.type-pill[data-type="ghost"] { background: var(--type-ghost); }
.type-pill[data-type="dragon"] { background: var(--type-dragon); }
.type-pill[data-type="steel"] { background: var(--type-steel); }
.type-pill[data-type="dark"] { background: var(--type-dark); }
.type-pill[data-type="fairy"] { background: var(--type-fairy); }

/* Filter Footer */
.filter-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-dark);
  display: flex;
  gap: 10px;
}

.btn-primary, .btn-secondary {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #00d2ff, #0072ff);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.w-full {
  width: 100%;
}

/* ==========================================================================
   Map Custom Markers & Circle
   ========================================================================== */

/* Player / Radar Center Marker */
.trainer-marker {
  position: relative;
  width: 44px;
  height: 44px;
}

.trainer-avatar {
  width: 36px;
  height: 36px;
  background: radial-gradient(circle, #ff385c, #b3002d);
  border: 3px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  font-size: 1.1rem;
  z-index: 5;
  position: relative;
}

.trainer-radar-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  margin-top: -25px;
  margin-left: -25px;
  border: 2px solid rgba(0, 210, 255, 0.8);
  background: rgba(0, 210, 255, 0.15);
  border-radius: 50%;
  animation: radar-sweep 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  pointer-events: none;
}

/* Pokemon Map Marker */
.poke-marker {
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.poke-marker:hover {
  transform: scale(1.18);
  z-index: 9999 !important;
}

.poke-card-pin {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.poke-sprite-bubble {
  width: 46px;
  height: 46px;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 2px solid var(--border-glass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  position: relative;
}

.poke-sprite-bubble img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.poke-iv-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  padding: 1px 5px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.poke-timer-badge {
  margin-top: 2px;
  background: rgba(11, 15, 25, 0.88);
  color: #cbd5e1;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

/* Hundo Pin Highlight */
.hundo-pin .poke-sprite-bubble {
  border-color: #ff0055;
  box-shadow: 0 0 16px rgba(255, 0, 85, 0.8);
  animation: bounce-glow 1.5s infinite alternate;
}

/* ==========================================================================
   Pokemon Detail Modal (Pokemon GO Appraisal View)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
  padding: 16px;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.pokemon-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-smooth);
}

.modal-backdrop.open .pokemon-modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.modal-header-bg {
  height: 180px;
  background: radial-gradient(circle at 50% 60%, rgba(0, 210, 255, 0.25), rgba(20, 27, 45, 0.95));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-cp-tag {
  position: absolute;
  top: 16px;
  left: 20px;
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.modal-sprite {
  width: 130px;
  height: 130px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.6));
  animation: float-anim 3s ease-in-out infinite;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-title-row h2 {
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 800;
}

.modal-dex-num {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.modal-iv-big {
  font-family: var(--font-main);
  font-size: 1.4rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 12px;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}

.modal-types-row {
  display: flex;
  gap: 8px;
}

.modal-type-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Appraisal Box */
.appraisal-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.appraisal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.stars-display {
  color: #ffbe0b;
  font-size: 1rem;
  letter-spacing: 2px;
}

.stat-bar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
}

.stat-bar-label strong {
  font-family: var(--font-main);
}

.stat-bar-track {
  height: 10px;
  background: #1e2942;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 5px;
  background: var(--accent-blue);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-bar-fill.bar-max {
  background: linear-gradient(90deg, #ff0055, #ff5500);
}

.stat-bar-fill.bar-high {
  background: linear-gradient(90deg, #00d2ff, #00e676);
}

.stat-bar-fill.bar-mid {
  background: #ffbe0b;
}

.stat-bar-ticks {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-evenly;
  pointer-events: none;
}

.stat-bar-ticks span {
  width: 2px;
  height: 100%;
  background: rgba(11, 15, 25, 0.7);
}

/* Meta Grid */
.spawn-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.meta-item {
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-icon {
  font-size: 1.2rem;
}

.meta-title {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.meta-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.text-timer {
  color: var(--accent-red);
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(255, 0, 85, 0.4);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 3000;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-smooth);
}

.toast-notification.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 1.8rem;
}

.toast-content h4 {
  font-family: var(--font-main);
  font-size: 0.92rem;
  color: #ff3377;
  margin-bottom: 2px;
}

.toast-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes ripple {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}

@keyframes radar-sweep {
  0% { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(3.2); opacity: 0; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 8px rgba(255, 56, 92, 0.4); }
  100% { box-shadow: 0 0 18px rgba(255, 56, 92, 0.85); }
}

@keyframes float-anim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes bounce-glow {
  0% { box-shadow: 0 0 10px rgba(255, 0, 85, 0.6); }
  100% { box-shadow: 0 0 24px rgba(255, 0, 85, 1); }
}

/* ==========================================================================
   Mobile Responsiveness
   ========================================================================== */
@media (max-width: 768px) {
  .app-header {
    padding: 0 12px;
  }

  .subtitle {
    display: none;
  }

  .stat-hundo {
    display: none;
  }

  .filter-panel {
    width: 100vw;
  }

  .map-overlay-controls {
    top: auto;
    bottom: 20px;
    left: 12px;
    right: 12px;
  }

  .radar-status-card {
    justify-content: space-between;
  }

  .map-hint {
    display: none;
  }
}

/* ==========================================================================
   Root Scanner Setup Modal Styles
   ========================================================================== */
.root-setup-modal {
  max-width: 520px;
}

.root-modal-header {
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--border-glass);
}

.root-modal-header h3 {
  font-family: var(--font-main);
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.root-modal-header p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.root-modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.webhook-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.webhook-url-row {
  display: flex;
  gap: 8px;
}

.webhook-url-row input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--accent-blue);
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 700;
  outline: none;
}

.btn-copy {
  background: linear-gradient(135deg, #00d2ff, #0072ff);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-copy:hover {
  filter: brightness(1.15);
}

.scanner-status-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
}

.scanner-status-box h4 {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: center;
}

.status-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-num {
  font-family: var(--font-main);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-green);
}

.status-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
}
