html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: black url('../images/background.jpg') no-repeat center center;
  background-size: cover;
  font-family: sans-serif;
  overflow: hidden;
}

/* Overlays: Start + Auszeit */
#overlay,
#pauseOverlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #000000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* App-Hauptlayout */
#appContainer {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Bubble-Bereich – zentriert */
#bubbleArea {
  flex: 1;
  background-color: #000000;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Sidebar */
#sidebar {
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

/* Sidebar-Buttons */
.nav-button {
  background-color: #555;
  color: #fff;
  border: none;
  padding: 0.8rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 8px;
  text-align: center;
}
.nav-button:hover {
  background-color: #777;
}

/* Allgemeine Bubbles */
.bubble {
  max-width: 90%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  line-height: 1.4;
  white-space: pre-wrap;
  margin: 0.5rem 0;
  word-break: break-word;
  text-align: center;
  border-radius: 20px;
  opacity: 0;
  transform: translateY(-30px);
  animation: fadeSlideCenter 0.3s ease forwards;
}

/* Fade-in Animation von oben */
@keyframes fadeSlideCenter {
  0%   { opacity: 0; transform: translateY(-40px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ✅ User-Bubble (Grün) */
.bubble.user {
  background-color: #92c12e;
  color: #000000;
}

/* Schwanz für user */
.bubble.user::after {
    content: "";
    position: absolute;
    top: 0;
    left: 25px;
    width: 50px;
    height: 50px;
    background: #92c12e;
    clip-path: polygon(0 100%, 100% 70%, 0 0);
    transform: translate(-50%, -50%);
}

/* ✅ Midi-Bubble (Blau) */
.bubble.midi {
  background-color: #2d54ae;
  color: #ffffff;
}

/* Schwanz für midi */
.bubble.midi::after {
  content: "";
  position: absolute;
  top: 0;
  right: -25px;            /* Feinjustierung, damit es an der Ecke sitzt */
  width: 50px;
  height: 50px;
  background: #2d54ae;
  /* Gespiegelte Version von polygon(0 100%, 100% 70%, 0 0) */
  clip-path: polygon(100% 100%, 0 70%, 100% 0);
  transform: translate(-50%, -50%);
}


/* Info-Bubble (Grau) */
.bubble.info {
  background-color: #525252;
  color: #ffffff;
  font-style: italic;
}

/* Verblassen von Bubbles */
.fade-out {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Icon-Button */
.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin: 0.5rem;
}
.icon-button img {
  width: 80px;
  height: 80px;
}

/* Tippende Punkte (optional) */
.bubble.info.typing {
  font-size: 4rem;
  color: #000000;
  cursor: pointer;
  line-height: 1;
}
.bubble.info.typing::after {
  content: "";
  display: inline-block;
  width: 2ch;
  animation: dots 1.2s steps(3, end) infinite;
}
@keyframes dots {
  0%   { content: "."; }
  33%  { content: ".."; }
  66%  { content: "..."; }
  100% { content: ""; }
}

/* Pulsierendes Midi-Wartebild (zentral & klickbar) */
.bubble.info.midi-image,
#overlay img.midi-pulsing,
#pauseOverlay img.midi-pulsing {
  display: flex;
  justify-content: center;
  align-items: center;
}
.bubble.info.midi-image img.midi-pulsing,
#overlay img.midi-pulsing,
#pauseOverlay img.midi-pulsing {
  width: 50vw;
  height: auto;
  animation: pulse 2s ease-in-out infinite;
  cursor: pointer;
}

/* Pulsieren-Animation */
@keyframes pulse {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.08); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

/* Mobile Optimierung */
html {
  font-size: 150%;
}
