/* Grundlayout */
body {
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 0;
  background: white;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
}

main {
  max-width: 600px;
  width: 100%;
  padding: 1rem;
}

header {
  background: white;
  padding: 1rem 0 0.5rem;
  text-align: center;
  border-bottom: 1px solid #eee;
  width: 100%;
}

.kapitel-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.kapitel-nav a {
  color: #cc3366;
  text-decoration: none;
  font-size: 1rem;
}

.kapitel-nav a:hover {
  text-decoration: underline;
}

/* Player */
.player-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.player-controls button {
  background: none;
  border: none;
  cursor: pointer;
}

.player-controls input[type=range] {
  width: 150px;
}

.playlist {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.playlist-entry {
  padding: 0.7rem;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  line-height: 1.4;
}

.playlist-entry.current {
  border-left: 4px solid #cc3366;
  background: #fef0f5;
}

em {
  font-style: italic;
  color: #333366;
}

/* Hilfe-Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.4);   /* leicht transparent */
  backdrop-filter: blur(12px);            /* Glas-Effekt */
  -webkit-backdrop-filter: blur(12px);    /* für Safari */
  z-index: 1000;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.hilfe-inhalt {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 90%;
  text-align: left;
}

.overlay.hidden {
  display: none;
}

.hilfe-inhalt {
  max-width: 600px;
  margin: auto;
}

/* Top-Button */
#top-button {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 60px;
  height: 60px;
  background-color: #cc3366;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: background-color 0.3s ease;
}

#top-button:hover {
  background-color: #aa2a55;
}

#top-button svg {
  width: 28px;
  height: 28px;
  fill: white;
}


/* Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  color: #cc3366;
  font-size: 0.9rem;
  width: 100%;
}

/* Glossar-Navigation zentriert und elegant */
.glossar-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem auto 2rem;
  max-width: 600px;
}

.glossar-nav a {
  font-size: 0.95rem;
  padding: 0.4rem 1rem;
  background-color: #333366;
  color: white;
  border-radius: 1.5rem;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.glossar-nav a:hover {
  background-color: #cc3366;
}


/* Geschwindigkeitsslider in Dunkelblau */
input[type="range"] {
  width: 150px;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  accent-color: #333366;
  appearance: auto;
  cursor: pointer;
}

/* Für Chrome, Safari, Edge */
input[type="range"]::-webkit-slider-thumb {
  background-color: #333366;
  border-radius: 50%;
  height: 18px;
  width: 18px;
  border: none;
}

/* Für Firefox */
input[type="range"]::-moz-range-thumb {
  background-color: #333366;
  border-radius: 50%;
  height: 18px;
  width: 18px;
  border: none;
}

.player-speed {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.player-speed input[type="range"] {
  width: 150px;
}
#speed-value {
  min-width: 40px;
  text-align: right;
  font-weight: bold;
  color: #333366;
}

/* Footer-Links farblich angleichen */
footer a {
  color: #cc3366;
  text-decoration: none;
  padding: 0 0.3rem;
}

footer a:hover {
  text-decoration: underline;
}
.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}
h3.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
  }
  h3.fade-out {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  
  h3 {
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .kapitel-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1em 0;
    gap: 0.5em;
  }
  
  
  
  .kapitel-button:hover {
    background-color: #cc3366;
    color: white;
  }
  
  
  .kapitel-button .nummer {
    margin: 0 0.3em;
  }
  
  .tooltip {
    position: relative;
    cursor: pointer;
  }
  
  .tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -2.2em;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333366;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
  }
  
  .tooltip:hover::after,
  .tooltip:focus::after {
    opacity: 1;
  }
  
  .info-icon {
    display: inline-block;
    background-color: #cc3366;
    color: white;
    font-weight: bold;
    font-size: 0.65em;
    border-radius: 50%;
    width: 1.2em;
    height: 1.2em;
    text-align: center;
    line-height: 1.2em;
    margin-left: 0.5em;
    font-family: sans-serif;
  }
  .kapitel-button.active {
    background-color: #cc3366;
    color: white;
    border: 2px solid #cc3366;
  }
  
  .kapitel-button.active .info-symbol {
    background-color: white;
    color: #cc3366;
  }
  .hilfe-button {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: white;          /* Weißer Hintergrund */
    color: #cc3366;                   /* Dein Rosa für das Fragezeichen */
    font-size: 1.4rem;
    font-weight: bold;
    border: 2px solid #cc3366;        /* Rosa Rand */
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transition: all 0.2s ease-in-out;
  }
  
  .hilfe-button:hover {
    background-color: #cc3366;        /* Umgekehrte Farben beim Hover */
    color: white;
  }
    #hilfe-overlay.hidden {
    display: none;
  }
  
  #hilfe-overlay.visible {
    display: block;
  }
  .hilfe-button svg {
    color: #cc3366;
  }
  #hilfe-schliessen {
    background-color: #cc3366;
    color: white;
    border: none;
    border-radius: 2em;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: background-color 0.2s ease;
  }
  
  #hilfe-schliessen:hover {
    background-color: #a22a53; /* dunkleres Rosa beim Hover */
  }
 /* #kapitelauswahl button {
    background-color: white;
    color: #cc3366;
    border: 2px solid #cc3366;
    border-radius: 999px;
    padding: 0.4rem 1rem;
    margin: 0.3rem;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
  }
  
  #kapitelauswahl button:hover {
    background-color: #fce5ef;
  }
  
  #kapitelauswahl button.active {
    background-color: #cc3366;
    color: white;
    border: 2px solid #333366;
  }
  #kapitelauswahl button {
    background-color: white;
    color: #cc3366;
    border: 2px solid #cc3366;
    border-radius: 999px;
    padding: 0.4rem 1rem;
    margin: 0.3rem;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
  }
  
  #kapitelauswahl button:hover {
    background-color: #fce5ef;
  }
  
  #kapitelauswahl button.active {
    background-color: #cc3366;
    color: white;
    border: 2px solid #333366;
  }*/

  .entry {
    margin-bottom: 1.2rem;
  }
  
  .entry.active {
    border-left: 4px solid #cc3366;
    background-color: #fff0f6;
  }
  
  .sprech-bereich.recording {
    border: 3px dashed #cc3366;
    padding: 1rem;
    animation: pulse 1s infinite;
  }
  
  @keyframes pulse {
    0% { box-shadow: 0 0 0 rgba(204, 51, 102, 0.4); }
    50% { box-shadow: 0 0 20px rgba(204, 51, 102, 0.7); }
    100% { box-shadow: 0 0 0 rgba(204, 51, 102, 0.4); }
  }
 
  
  .aufnahme-hinweis {
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: #333366;
    margin-top: 0.5rem;
    transition: opacity 0.3s ease;
    opacity: 0;
    visibility: hidden;
  }
  
  .aufnahme-hinweis.active {
    opacity: 1;
    visibility: visible;
  }
  
  .aufnahme-hinweis.active::before {
    content: "🔴 ";
    animation: pulse 1s infinite;
  }
    
  .countdown {
    font-size: 2rem;
    font-weight: bold;
    color: #cc3366;
    text-align: center;
    margin-top: 1rem;
    animation: pop 0.3s ease-in-out;
  }
  
  @keyframes pop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
  }
  .progressbar {
    height: 8px;
    width: 0%;
    background-color: #cc3366;
    transition: width 3s linear;
    margin-top: 0.5rem;
    border-radius: 4px;
  }
  .svg-button {
    width: 3.5rem;
    height: 3.5rem;
    background-color: #cc3366;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background-color 0.3s ease;
    cursor: pointer;
  }
  
  .svg-button:hover {
    background-color: #b02d5c;
    transform: scale(1.05);
  }
/* Recorder sticky vor den Einträgen*/
  .sticky-recorder {
    position: sticky;
    top: 0.5rem;
    z-index: 10;
    background: white;
    padding: 0.5rem;
  }
  
  .special-button {
    background: white;
    color: #cc3366;
    border: 2px dashed #cc3366;
    font-weight: bold;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    margin-top: 1.2rem;
  }
  
  /* Optional: auf kleineren Geräten etwas größer darstellen */
  @media (max-width: 480px) {
    .special-button {
      font-size: 1rem;
      padding: 0.6rem 1rem;
    }
  }
  
  .sprechmodul-link {
    text-align: center;
    margin: 2rem 0 1rem;
  }
  
  @media (max-width: 480px) {  
  }

.kapitel-button {
  padding: 0.3em 0.8em;
  font-size: 0.9rem;
  border-radius: 2em;
  border: 2px solid #cc3366;
  color: #cc3366;
  background-color: white;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}


#extra-buttons {
  position: fixed;
  top: 5rem; /* vorher: 1rem */
  right: 1rem;
  z-index: 1000;
}

.sprechmodul-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #333366;
  color: white;
  padding: 0.6em 1.2em;
  font-size: 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s ease;
}

.sprechmodul-button:hover {
  background-color: #555599;
}
#sprechmodul-auswahl {
  text-align: center;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

#sprechmodul-auswahl button {
  background-color: white;
  color: #cc3366;
  border: 2px solid #cc3366;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}
@media (max-width: 480px) {
  #sprechmodul-auswahl {
    padding: 0 0.5rem;
    gap: 0.4rem;
  }

  #sprechmodul-auswahl button {
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    white-space: nowrap;
    max-width: 100%;
    line-height: 1.2;
  }
}

#sprechmodul-auswahl button:hover {
  background-color: #fce5ef;
}

#sprechmodul-auswahl button.active {
  background-color: #cc3366;
  color: white;
  border: 2px solid #333366;
}
.sprech-phrase {
  background: #fff;
  border-radius: 0.6rem;
  padding: 0.6rem;
  margin: 0.6rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.sprech-phrase:hover {
  background-color: #f8f8f8;
}

.sprech-phrase.active {
  background-color: #fce0ea;
  border-left: 4px solid #cc3366;
}

.satz-info {
  margin: 0.2rem 0;
  font-size: 1rem;
  line-height: 1.4;
}

.flagge {
  margin-right: 0.4rem;
}

.lautschrift {
  color: #333;
  font-style: italic;
  font-weight: bold;
}

.freischalt-hinweis {
  background: #fff0f6;
  color: #cc3366;
  text-align: center;
  padding: 1rem;
  margin: 2rem auto;
  border: 2px dashed #cc3366;
  border-radius: 1rem;
  max-width: 600px;
  font-size: 1rem;
}
.svg-button.back-to-audio {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 60px;
  height: 60px;
  background-color: #cc3366;
  color: white;
  font-size: 26px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.svg-button.back-to-audio:hover {
  background-color: #a82a55;
}

.play-button {
  background: #cc3366;
  color: white;
  border: none;
  border-radius: 2rem;
  padding: 0.6rem 1.2rem;
  font-weight: bold;
  font-size: 1rem;
  margin-top: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}
