/* ==========================================================================
   ZAHLENMAUER-WERKSTATT THEME STYLES
   Lücken-Zahlenmauern bis 10'000 mit stummem Rechenstrich
   ========================================================================== */

.theme-zahlenmauer {
  --c-zm-bg: #1e130c;
  --c-zm-accent: #f59e0b;
  --c-zm-gold: #fcd34d;
  background-color: var(--c-zm-bg);
  color: var(--c-chalk);
}

.theme-zahlenmauer .intro-bg,
.theme-zahlenmauer .levelup-bg {
  background-size: cover;
  background-position: center;
  filter: brightness(0.55) blur(2px);
}

.theme-zahlenmauer .fox-glow {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, transparent 70%);
}

.theme-zahlenmauer .btn-start,
.theme-zahlenmauer .btn-continue-big {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #1c1008;
  text-shadow: none;
}

.theme-zahlenmauer .btn-start:hover,
.theme-zahlenmauer .btn-continue-big:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.45);
}

.theme-zahlenmauer .top-progress .progress-fill {
  background: linear-gradient(90deg, #f59e0b, #fde047);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.theme-zahlenmauer .board-panel {
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.theme-zahlenmauer .chalkboard-wrapper {
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
  flex: none;
  min-height: auto;
}

.theme-zahlenmauer .chalkboard {
  min-height: auto;
  padding: 14px 18px;
  flex: none;
}

.theme-zahlenmauer .numpad-section,
.theme-zahlenmauer #next-task-section {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: 100%;
  max-width: 620px;
  margin: 6px auto 0;
  flex-direction: column;
  align-items: center;
  padding: 10px 14px;
}

.theme-zahlenmauer .numpad-btn {
  width: 58px;
  height: 54px;
  font-size: 1.75rem;
}

/* ── ZAHLENMAUER PYRAMIDE ─────────────────────────────────────────────── */
.zm-pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
  width: 100%;
}

.zm-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.zm-brick {
  width: 132px;
  max-width: 30%;
  min-height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-num);
  font-weight: 800;
  font-size: clamp(1.2rem, 2.3vw, 1.65rem);
  letter-spacing: 0.02em;
  border: 2px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  user-select: none;
}

.zm-brick.brick-given {
  background: linear-gradient(145deg, rgba(146, 64, 14, 0.72), rgba(92, 40, 14, 0.85));
  color: #fef3c7;
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.12), 0 4px 10px rgba(0, 0, 0, 0.35);
}

.zm-brick.brick-gap {
  background: rgba(15, 23, 42, 0.65);
  color: #94a3b8;
  border: 2px dashed rgba(251, 191, 36, 0.55);
  cursor: pointer;
}

.zm-brick.brick-gap:hover {
  transform: translateY(-2px);
  border-color: #fde047;
}

.zm-brick.brick-active {
  background: rgba(245, 158, 11, 0.22);
  color: #fde047;
  border: 2.5px solid #fde047;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.45);
  transform: scale(1.04);
}

.zm-brick.brick-partner {
  box-shadow: 0 0 0 2px rgba(74, 242, 212, 0.65), 0 4px 12px rgba(74, 242, 212, 0.2);
  border-color: #4af2d4;
}

.zm-brick.brick-solved {
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.35), rgba(21, 128, 61, 0.55));
  color: #bbf7d0;
  border: 2px solid #4ade80;
  cursor: default;
}

.zm-brick.brick-wrong {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.24);
  animation: zmShake 0.35s ease;
}

@keyframes zmShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ── STUMMER RECHENSTRICH (SCAFFOLDING) ───────────────────────────────── */
.zm-scaffold-area {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  text-align: center;
}

.zm-scaffold-title {
  font-family: var(--f-board);
  font-size: 0.95rem;
  color: #7dd3fc;
  margin-bottom: 6px;
}

.zm-bridge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.zm-bridge-node {
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  font-family: var(--f-num);
  font-weight: 800;
  font-size: 1rem;
  color: #f8fafc;
}

.zm-bridge-node.zm-anchor {
  background: rgba(251, 191, 36, 0.18);
  border-color: #fbbf24;
  color: #fde047;
}

.zm-bridge-node.zm-target {
  background: rgba(74, 242, 212, 0.16);
  border-color: #4af2d4;
  color: #4af2d4;
}

.zm-bridge-arc {
  font-family: var(--f-board);
  font-size: 0.9rem;
  color: #38bdf8;
  padding: 2px 6px;
  border-bottom: 2px dashed rgba(56, 189, 248, 0.65);
}

.zm-scaffold-sub {
  margin-top: 6px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 900px) {
  .zm-brick {
    width: 100px;
    min-height: 48px;
    font-size: 1.15rem;
  }
}
