/* ============================================================
   wordgame.css — Wort-Merge-Spiel
   Verwendet von: second.html
   Setzt base.css voraus.
   ============================================================ */

.second-page-main {
  padding-top: 1.25rem;
  max-width: min(1400px, 95vw);
}

.wordgame-shell {
  width: 100%;
  position: relative;
  padding: 0.25rem 0;
  grid-column: 1 / -1;
}

.wordgame-instructions {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 0.98rem;
  opacity: 0.9;
}

.wordgame-area {
  position: relative;
  width: 100%;
  height: min(680px, 78vh);
  background: linear-gradient(160deg, #e8f4f8 0%, #f6f0ff 100%);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.06);
  touch-action: none;
}

.merge-box {
  position: absolute;
  width: 128px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 2px solid rgba(26, 26, 46, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
  cursor: grab;
  user-select: none;
  touch-action: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.merge-box.is-dragging {
  cursor: grabbing;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.merge-box__group {
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  color: #5b4fcf;
  margin-bottom: 2px;
  letter-spacing: 0.03em;
  line-height: 1.15;
}

.merge-box--complete {
  background: rgba(0, 0, 0, 0.07);
  border-color: rgba(0, 0, 0, 0.14);
}

.merge-box__term {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text);
  text-align: center;
  line-height: 1.05;
}

.wordgame-win {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 900;
  color: #00b894;
  background: rgba(255, 255, 255, 0.55);
  z-index: 50;
  pointer-events: none;
}

.wordgame-win:not([hidden]) {
  display: flex;
}
