/* Basis-Styles für alle Seiten */
html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
  color: #fff;
 
}

/* Allgemeine Container */
.box {
  background-color: rgba(0,0,0,0.6);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  padding: 20px;
  margin: 20px auto;
  max-width: 900px;
}

/* Gedichte / Texte */
.poem {
  max-width: 800px;
  line-height: 1.7;
  font-size: 1.15em;
  margin: 0 auto;
}

/* Eingaben und Buttons */
input, button {
  font-size: 1.05em;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  outline: none;
}

input {
  text-align: center;
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Bilder und Videos */
video, img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}

/* Wortbank & Ablagebox */
.word-bank, .drop-zone {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  border: 2px dashed rgba(255,255,255,0.6);
  border-radius: 8px;
  min-height: 64px;
}

/* Wörter */
.word {
  background: rgba(255,255,255,0.15);
  padding: 12px 18px;
  border-radius: 8px;
  cursor: grab;
  font-size: 1.2em;
  user-select: none;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.word.dragging { opacity: 0.5; }
.correct { background-color: rgba(0,255,0,0.35) !important; }
.wrong   { background-color: rgba(255,0,0,0.35) !important; }

/* Memory-Spiel */
.game-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.card {
  aspect-ratio: 1 / 1; /* quadratisch */
  width: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;              /* Bild zentrieren */
  align-items: center;
  justify-content: center;
}

.card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;        /* Bild vollständig sichtbar */
  object-position: center;
  display: block;
}

/* Hinweise */
.hint {
  margin-top: 10px;
  font-size: 0.95em;
  opacity: 0.85;
}

/* Mobile-Optimierung */
@media (max-width: 600px) {
  body { padding: 10px; }

  .box {
    padding: 16px;
    margin: 12px auto;
    max-width: 95vw;
  }

  .poem {
    font-size: 1.25em;
    line-height: 1.85;
  }

  input, button {
    font-size: 1.2em;
    padding: 14px 18px;
    min-height: 44px; /* Touch-freundlich */
  }

  .word {
    font-size: 1.35em;
    padding: 16px 22px;
    min-width: 110px;
  }

  .word-bank, .drop-zone {
    gap: 16px;
    padding: 18px;
    min-height: 80px;
  }

  .game-board {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
  }

  video {
    width: 100%;
    max-width: 100%;
  }
}
