* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  background: #444;
  color: #666;
  font-family: Arial, sans-serif;
  touch-action: none;
}

/* UI */
#scoreboard {
  margin: 12px 16px;
  font-size: 18px;
}
#restartBtn {
  margin: 16px;
  background: #ff9800;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 16px;
  cursor: pointer;
}
#restartBtn:hover {
  background: #e68a00;
}

/* Grid */
#grid {
  display: grid;
  grid-template-columns: repeat(8, 40px);
  grid-template-rows: repeat(8, 40px);
  gap: 0;
  border: 2px solid #444;
  background: #333;
  width: 320px;
  height: 320px;
  margin: 0 16px;
}
.cell {
  width: 40px;
  height: 40px;
  background-color: #eee;
  border: 0px solid #444;
  border-radius: 4px;
}
.cell.filled {
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.35);
}
.cell.highlight {
  background-color: yellow !important;
  animation: flash 0.5s ease;
}
@keyframes flash {
  0% {
    background-color: yellow;
  }
  100% {
    background-color: #eee;
  }
}

/* Teile */
#parts {
  display: flex;
  gap: 16px;
  margin: 16px;
  flex-wrap: wrap;
}
.part {
  position: relative;
  cursor: grab;
  user-select: none;
  touch-action: none;
  background: transparent;
  border-radius: 8px;
  padding: 6px;
}
.part > div > div {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  border: 0px solid #333;
  box-sizing: border-box;
  /* KEIN background hier, Farbe setzt JS */
}

/* Game Over */
#gameover {
  margin: 16px;
  font-size: 22px;
  color: #ff5252;
  font-weight: bold;
}
