/* 1) Globales Box‑Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2) Body */
body {
  margin: 0;
  padding: 0;
  background-color: #000;
  font-family: Arial, sans-serif;
  height: 100%;
}

/* 3) App-Container */
#app {
  position: relative;
  height: 100vh;
  width: 90%;
  max-width: 600px;
  aspect-ratio: 9/16;
  margin: 20px auto;
  border-radius: 10px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* 4) Bubble-Container füllt ganzen Bereich und scrollt */
.bubble-container {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  padding: 10px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: transparent;
}

/* 5) Satz‑Boxen */
.sentence-box {
  background: rgba(0, 0, 0, 0.7);
  color: #dcddba;
  padding: 8px;
  border-radius: 15px;
  margin-bottom: 10px;
  width: 90%;
  max-width: 500px;
}
.sentence-box p {
  margin: 0;
}

/* 6) Größere Schrift in Bubbles */
.bubble-container p,
.sentence-header {
  font-size: 1.2em; /* etwas kleiner für alle Geräte */
}
.sentence-header {
  font-weight: bold;
  margin-bottom: 4px;
}

/* 7) Button‑Gruppen: immer wrap */
.btn-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

/* 8) Buttons */
button {
  background-color: #dcddba;
  border: none;
  color: #000;
  padding: 8px 12px;
  font-size: 1em;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}
button:hover {
  background-color: #c0bfa0;
}

/* 9) Textarea im Diktat‑Modus */
.bubble-container textarea {
  font-size: 1em;
  width: 100%;
  max-width: 500px;
  height: 120px;
  padding: 10px;
  resize: vertical;
  white-space: pre-wrap;
  margin-bottom: 10px;
}

/* 10) Ergebnis‑Box bleibt statisch */
.result {
  width: 100%;
  max-width: 500px;
  background-color: #fff;
  color: #000;
  padding: 8px;
  margin-bottom: 10px;
  text-align: left;
  border-radius: 5px;
  font-size: 1em;
  overflow-y: auto;
  max-height: 150px;
}

/* 11) Freihand-Anzeige */
.freehand-display {
  width: 100%;
  max-width: 500px;
  max-height: 150px;
  overflow-y: auto;
  background-color: #fff;
  color: #000;
  padding: 8px;
  border-radius: 5px;
  margin-bottom: 10px;
}

/* 12) Center‑Container (Sprachauswahl) */
.center-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #dcddba;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
  text-align: center;
}
.lang-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Buttons horizontal zentrieren */
  gap: 10px;
  margin-top: 20px;
}

/* 13) Passwort-Overlay */
#password-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}
#password-container {
  background: #fff;
  padding: 20px;
  border-radius: 5px;
  text-align: center;
}
#password-container p {
  margin-bottom: 10px;
  font-size: 16px;
  color: #000;
}
#password-input {
  padding: 8px;
  font-size: 16px;
  width: 200px;
  margin-bottom: 10px;
}
#password-submit {
  padding: 8px 16px;
  font-size: 16px;
  cursor: pointer;
}

/* 14) Responsive Anpassungen */
@media only screen and (max-width: 600px) {
  #app {
    width: 100%;
    margin: 0;
    border-radius: 0;
  }
  .sentence-box {
    padding: 6px;
  }
  .bubble-container p,
  .sentence-header {
    font-size: 1.1em;
  }
  button {
    padding: 6px 10px;
    font-size: 0.9em;
  }
  .bubble-container {
    padding: 10px;
  }
}
