/* overlay.css - Estilos transparentes optimizados para Fuente de Navegador de OBS Studio y Streamlabs */

html, body {
  background: transparent !important;
  background-color: transparent !important;
  margin: 0;
  padding: 0;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.overlay-container {
  padding: 1.25rem;
  display: inline-flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  user-select: none;
  font-family: var(--font-main);
  max-width: 540px;
}

/* WIDGET PRINCIPAL */
.overlay-widget {
  background: rgba(13, 13, 26, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 1rem 1.4rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7), var(--shadow-neon-purple);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
  transition: all var(--transition-normal);
}

/* Fila Superior: Título & Multiplicador */
.overlay-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.overlay-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.overlay-brand-icon {
  font-size: 1.1rem;
}

.overlay-brand-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--twitch-purple-light);
}

/* Badge de Multiplicador */
/* Badge de Pausa en Overlay */
.overlay-paused-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.75rem;
  background: rgba(239, 68, 68, 0.3);
  border: 1px solid #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
  animation: pulseGlow 1.5s infinite;
}

/* Badge de Modo Noche en Overlay */
.overlay-night-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.75rem;
  background: rgba(168, 85, 247, 0.25);
  border: 1px solid #a855f7;
  color: #d8b4fe;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.overlay-mult-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.82rem;
  background: rgba(145, 70, 255, 0.25);
  border: 1px solid var(--twitch-purple);
  color: #fff;
  box-shadow: 0 0 10px rgba(145, 70, 255, 0.4);
  transition: all var(--transition-bounce);
}

.overlay-mult-badge.boost-2 {
  background: rgba(0, 245, 212, 0.25);
  border-color: var(--mult-2);
  color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(0, 245, 212, 0.6);
  animation: pulseGlow 1.8s infinite;
}

.overlay-mult-badge.boost-3 {
  background: rgba(255, 190, 11, 0.25);
  border-color: var(--mult-3);
  color: var(--accent-gold);
  box-shadow: 0 0 16px rgba(255, 190, 11, 0.7);
  animation: fireFlicker 1.4s infinite;
}

.overlay-mult-badge.boost-4 {
  background: rgba(255, 84, 0, 0.3);
  border-color: var(--mult-4);
  color: #ff7d3b;
  box-shadow: 0 0 18px rgba(255, 84, 0, 0.8);
  animation: fireFlicker 1.1s infinite;
}

.overlay-mult-badge.boost-5 {
  background: rgba(255, 0, 127, 0.35);
  border-color: var(--mult-5);
  color: #ff2a9d;
  box-shadow: 0 0 22px rgba(255, 0, 127, 0.9);
  animation: pulseGlow 1s infinite, fireFlicker 1s infinite;
}

/* RELOJ / DÍGITOS EN OVERLAY */
.overlay-timer-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.3rem;
}

.overlay-digits {
  font-family: var(--font-mono);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -1.5px;
  text-shadow: 0 0 20px var(--twitch-purple-glow), 0 0 40px rgba(145, 70, 255, 0.4);
}

.overlay-digits.paused {
  color: #f87171;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
  opacity: 0.85;
}

/* Flotante: Animación de tiempo añadido (+15m) */
.time-fly-container {
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.time-fly-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.15rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.7);
  animation: flyUpAndFade 2.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes flyUpAndFade {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.7);
  }
  20% {
    opacity: 1;
    transform: translateY(0) scale(1.15);
  }
  40% {
    transform: translateY(-8px) scale(1);
  }
  80% {
    opacity: 1;
    transform: translateY(-24px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px) scale(0.9);
  }
}

/* BARRA DE METAS EN OVERLAY */
.overlay-goal-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(145, 70, 255, 0.15);
}

.overlay-goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  gap: 0.85rem;
  width: 100%;
}

.overlay-goal-title {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
  flex: 1;
}

.overlay-goal-counter {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.overlay-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-pill);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.overlay-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--twitch-purple), var(--accent-cyan));
  border-radius: var(--radius-pill);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.6);
  transition: width 0.4s ease-out;
}

/* NOTIFICACIÓN TOAST FLOTANTE EN OVERLAY */
.overlay-notification-card {
  position: absolute;
  bottom: -60px;
  left: 1.25rem;
  right: 1.25rem;
  background: rgba(20, 20, 40, 0.95);
  border: 1.5px solid var(--accent-cyan);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 245, 212, 0.4);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10;
}

.overlay-notification-card.active {
  opacity: 1;
  transform: translateY(0);
}

.overlay-notif-icon {
  font-size: 1.3rem;
}

.overlay-notif-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.overlay-notif-subtext {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* TEMAS VISUALES */
/* Cyberpunk Theme */
.theme-cyberpunk .overlay-widget {
  background: rgba(10, 10, 15, 0.88);
  border-color: #fee440;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(254, 228, 64, 0.4);
}
.theme-cyberpunk .overlay-digits {
  color: #fee440;
  text-shadow: 0 0 25px rgba(254, 228, 64, 0.7);
}
.theme-cyberpunk .overlay-brand-title {
  color: #00f5d4;
}

/* Synthwave Sunset Theme */
.theme-synthwave .overlay-widget {
  background: rgba(20, 10, 30, 0.88);
  border-color: #ff007f;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 0, 127, 0.4);
}
.theme-synthwave .overlay-digits {
  color: #fff;
  text-shadow: 0 0 25px rgba(255, 0, 127, 0.8);
}
.theme-synthwave .overlay-progress-fill {
  background: linear-gradient(90deg, #ff007f, #ffbe0b);
}

/* Emerald Matrix Theme */
.theme-emerald .overlay-widget {
  background: rgba(5, 20, 10, 0.88);
  border-color: #10b981;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(16, 185, 129, 0.4);
}
.theme-emerald .overlay-digits {
  color: #34d399;
  text-shadow: 0 0 25px rgba(16, 185, 129, 0.8);
}

/* Minimal Dark Theme */
.theme-minimal .overlay-widget {
  background: rgba(15, 15, 20, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.theme-minimal .overlay-digits {
  color: #ffffff;
  text-shadow: none;
}

/* ===================================================
   CAPA DE PARPADEO DE PANTALLA COMPLETA (SCREEN FLASH)
   =================================================== */
.screen-flash-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
}

/* Efecto Sólido */
.screen-flash-overlay.flash-solid {
  animation: animFlashSolid var(--flash-duration, 1.5s) ease-out forwards;
}

@keyframes animFlashSolid {
  0% { opacity: 0.85; }
  15% { opacity: 0.7; }
  50% { opacity: 0.4; }
  100% { opacity: 0; }
}

/* Efecto Estroboscópico / Strobe */
.screen-flash-overlay.flash-strobe {
  animation: animFlashStrobe var(--flash-speed, 0.3s) ease-in-out infinite alternate;
}

@keyframes animFlashStrobe {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}

/* Efecto Neón Pulso */
.screen-flash-overlay.flash-neon {
  animation: animFlashNeon var(--flash-speed, 0.5s) ease-in-out infinite alternate;
  box-shadow: inset 0 0 120px currentColor, inset 0 0 200px currentColor;
}

@keyframes animFlashNeon {
  0% { opacity: 0.3; }
  100% { opacity: 0.85; }
}

/* Efecto Glitch */
.screen-flash-overlay.flash-glitch {
  animation: animFlashGlitch 0.2s steps(2, start) infinite;
}

@keyframes animFlashGlitch {
  0% { opacity: 0.8; transform: translate(2px, -2px); }
  50% { opacity: 0.2; transform: translate(-2px, 2px); }
  100% { opacity: 0.9; transform: translate(0, 0); }
}

