/* ---------------------------------------------------------
   GRUNDLAYOUT – identisch zu Spiel 1
--------------------------------------------------------- */
* { box-sizing: border-box; }

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  background: #fafafa;
  margin: 0;
  padding-top: 40px;
}

.page-center {
  width: 100%;
  display: flex;
  justify-content: center;
}

.spielblock {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.wrapper {
  display: flex;
  gap: 40px;
  padding: 20px;
  width: 700px;
  margin: 0 auto;
}


.panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

/* ---------------------------------------------------------
   SPIELFELD 4×4
--------------------------------------------------------- */
.board4 {
  display: grid;
  grid-template-columns: repeat(4, 60px);
  grid-template-rows: repeat(4, 60px);
  gap: 4px;
}

.cell4 {
  width: 60px;
  height: 60px;
  border: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  font-weight: bold;
  user-select: none;
  transition: background 0.2s;
}

.cell4.drag-over {
  outline: 3px dashed #3498db;
}

.cell4.error {
  animation: errorFlash2 0.6s ease-in-out;
  background: #ffb3b3 !important;
}

@keyframes errorFlash2 {
  0% { background: #ff0000; }
  100% { background: #ffb3b3; }
}

/* ---------------------------------------------------------
   KARTEN 4×4
--------------------------------------------------------- */
.cards4 {
  display: grid;
  grid-template-columns: repeat(4, 60px);
  grid-template-rows: repeat(4, 60px);
  gap: 6px;
}

.card4 {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  cursor: grab;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s;
}

.card4.dragging {
  opacity: 0.7;
  transform: scale(1.15);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Farben */
.color-1 { background: #e74c3c; }
.color-2 { background: #3498db; }
.color-3 { background: #27ae60; }
.color-4 { background: #f1c40f; color:#000; }

/* ---------------------------------------------------------
   Status & Anleitung
--------------------------------------------------------- */
.status {
  margin-top: 10px;
  font-weight: bold;
  min-height: 1.2em;
}

.status.ok { color: green; }
.status.error { color: red; }

.instructions {
  max-width: 420px;
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.4;
}
