/* ============================================
   HEADER BAR - CharmsBot
   ============================================ */

.top-header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: rgba(91, 45, 132, 0.85);
  border-bottom: 1px solid rgba(160, 120, 220, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  z-index: 10000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* ============================================
   BOT STATUS (Izquierda)
   ============================================ */

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.bot-status-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transition: all 0.4s ease;
}

.bot-status-text {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Colores Dinámicos */
.header-left.offline .bot-status-indicator {
  background: #e74c3c;
  box-shadow: 0 0 12px rgba(231, 76, 60, 0.6);
  animation: pulse-offline 2s infinite;
}
.header-left.offline .bot-status-text { color: #e74c3c; }

.header-left.online .bot-status-indicator {
  background: #2ecc71;
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.6);
  animation: pulse-online 2s infinite;
}
.header-left.online .bot-status-text { color: #2ecc71; }

@keyframes pulse-offline {
  0%, 100% { box-shadow: 0 0 8px rgba(231, 76, 60, 0.4); }
  50%       { box-shadow: 0 0 16px rgba(231, 76, 60, 0.8); }
}

@keyframes pulse-online {
  0%, 100% { box-shadow: 0 0 8px rgba(46, 204, 113, 0.4); }
  50%       { box-shadow: 0 0 16px rgba(46, 204, 113, 0.8); }
}

/* ============================================
   SERVER SAVE COUNTDOWN (Centro)
   ============================================ */

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.countdown-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.countdown-timer {
  color: #00d4ff;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 22px;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* ============================================
   TODAY'S BOOSTED (Derecha) — SISTEMA DE SLOTS
   ============================================ */

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 250px;
  justify-content: flex-end;
}

.boosted-label {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.boosted-pedestal {
  position: relative;
  width: 235px;
  height: 91px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pedestal-base {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  z-index: 1;
}

/* ===== SLOTS AUTO-AJUSTABLES ===== */
.pedestal-slot-creature,
.pedestal-slot-boss {
  position: absolute;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2;
  /* DEBUG: descomenta para ver los slots
  background: rgba(255, 0, 0, 0.3);
  border: 2px dashed red; */
}

/* Coordenadas exactas — NO cambiar sin probar */
.pedestal-slot-creature {
  bottom: 33px;
  left: 44px;
}

.pedestal-slot-boss {
  bottom: 32px;
  left: 109px;
}

/* Sprites AUTO-AJUSTABLES */
.boosted-sprite-creature,
.boosted-sprite-boss {
  max-width: 110%;
  max-height: 110%;
  width: auto;
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.8));
  margin-bottom: 3px;
}

/* ============================================
   LANGUAGE SWITCHER — Banderas SVG verticales
   ============================================ */

.lang-switcher {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  margin-left: 16px;
  flex-shrink: 0;
  /* Sin fondo — solo las banderas */
}

.lang-btn {
  background: transparent;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 2px;
  cursor: pointer;
  line-height: 0;
  transition: transform 0.12s ease, border-color 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-btn img {
  display: block;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.lang-btn:hover {
  transform: scale(1.12);
}

.lang-btn.active {
  border-color: rgba(255, 255, 255, 0.70);
  border-radius: 6px;
  transform: scale(1.08);
}

.lang-btn {
  background: transparent;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 3px 5px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.lang-btn:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.08);
}

.lang-btn.active {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.10);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

/* ============================================
   SOLUCIÓN AL DESPLAZAMIENTO
   ============================================ */

body {
  padding-top: 90px !important;
}

.container {
  padding-top: 40px !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1100px) {
  .boosted-label { display: none; }
}

@media (max-width: 992px) {
  .top-header-bar {
    height: auto;
    flex-direction: column;
    padding: 15px 20px;
    gap: 15px;
  }

  .header-center { position: static; transform: none; order: 2; }
  .header-left   { min-width: auto; order: 1; }
  .header-right  { min-width: auto; order: 3; justify-content: center; }

  .lang-switcher { margin-left: 8px; }

  body { padding-top: 180px !important; }
}

@media (max-width: 576px) {
  .countdown-timer { font-size: 18px; }

  .boosted-pedestal { width: 180px; height: 70px; }

  .pedestal-slot-creature,
  .pedestal-slot-boss {
    width: 50px;
    height: 50px;
  }

  .pedestal-slot-creature { left: 25px;  bottom: 10px; }
  .pedestal-slot-boss     { left: 105px; bottom: 10px; }

  .lang-btn { font-size: 18px; padding: 2px 4px; }

  body { padding-top: 160px !important; }
}