/* === Hilfebox Style: Modern Blue Theme V2 KRITISCH KORRIGIERT === */
#help-box {
  position: fixed !important; 
  bottom: 80px !important;    
  right: 20px !important;
  background: #1976D2; /* Sattes, modernes Blau */
  color: #FFFFFF;     /* Weißer Text für Kontrast */
  padding: 18px !important; /* Etwas mehr Padding */
  border: 2px solid #FFC107 !important; /* KRITISCH: Gelber Rand */
  border-radius: 12px; /* Abgerundete Ecken */
  box-shadow: 0 6px 15px rgba(0,0,0,0.4), 0 0 8px rgba(255,255,0,0.5); /* Optimierter Schatten */
  font-size: 14px;
  line-height: 1.5;
  max-width: 300px !important; /* KRITISCH: Breite erhöhen */
  width: 300px !important;     /* KRITISCH: Breite erhöhen */
  display: none;
  z-index: 10000 !important; /* Wichtig: Über allem liegen */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Styling für die Kopfzeile (mit Icons) */
#help-box .help-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px; 
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Icons */
#help-box .help-icon {
  cursor: pointer;
  font-size: 20px;
}

/* Icon für Einstellungen */
#help-box .settings-icon {
    color: #FFFF00 !important; /* Gelb */
}

/* Icon für Befehle (📚) */
#help-box .commands-icon { 
    color: #FFFFFF !important; /* Weiß */
    margin: 0 10px; 
}

/* Icon für Info (ℹ) */
#help-box .info-icon { 
    color: #A8D5FF !important; /* Helles Blau */
    margin-right: 10px;
}

/* Icon für Schließen (✖) */
#help-box .close-icon {
    color: #FF0000 !important; /* Rot */
}

/* Text-Container und List-Items */
#help-box p, #help-box ul {
  margin: 0 0 10px 0;
  color: white; 
}

#help-box ul {
  list-style: none;
  padding-left: 0;
}

/* Stil für Befehls-Tags */
#help-box code {
  background: #0d47a1;
  color: #FFF0B5;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: bold;
}
/* =========================================================================
   GOOGLE-STYLE WORD HIGHLIGHTING - NEU
   ========================================================================= */

/* Basis für alle highlightbaren Wörter */
.sp-word {
  display: inline;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 3px;
  padding: 2px 0;
}

/* Aktives Wort (wird gerade vorgelesen) - Google-Style */
.sp-word-active {
  background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%) !important;
  color: #000000 !important;
  font-weight: 500 !important;
  padding: 3px 5px !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(132, 250, 176, 0.4) !important;
  transform: scale(1.02);
  position: relative;
  z-index: 1;
}

/* Bereits gelesene Wörter (optional) */
.sp-word-read {
  color: #888888;
  opacity: 0.7;
}

/* Animation für Wort-Wechsel */
@keyframes wordPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1.02); }
}

.sp-word-active {
  animation: wordPulse 0.3s ease-out;
}

/* Für dunkle Themes - Alternative Farben */
.sp-word-active-dark {
  background: linear-gradient(120deg, #667eea 0%, #764ba2 100%) !important;
  color: #ffffff !important;
}

/* Mobile-optimiert */
@media (max-width: 768px) {
  .sp-word-active {
    padding: 4px 6px !important;
    font-size: 1.02em;
  }
}

/* Verhindert Layout-Shifts */
.sp-highlighting-active {
  line-height: 1.8 !important;
}

/* Smooth Scroll Marker (optional - für Debugging) */
.sp-scroll-marker {
  position: fixed;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(66, 133, 244, 0.3);
  top: 50%;
  pointer-events: none;
  z-index: 9997;
  display: none;
}

.sp-scroll-marker.active {
  display: block;
}
/* =========================================================================
   GOOGLE-STYLE WORD HIGHLIGHTING
   ========================================================================= */

/* Basis für highlightbare Wörter */
.sp-word {
  display: inline;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 3px;
  padding: 2px 0;
}

/* Aktives Wort (Google-Style) */
.sp-word-active {
  background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%) !important;
  color: #000000 !important;
  font-weight: 500 !important;
  padding: 3px 5px !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(132, 250, 176, 0.4) !important;
  transform: scale(1.02);
}

/* Gelesene Wörter */
.sp-word-read {
  color: #888888;
  opacity: 0.7;
}

/* Animation */
@keyframes wordPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1.02); }
}

.sp-word-active {
  animation: wordPulse 0.3s ease-out;
}
