@import url("../../../assets/interactive-workbench.css");

:root {
  --tool-accent: #2f80ed;
  --tool-accent-strong: #1f6ad4;
  --tool-accent-soft: #ebf4ff;
}

.schulte-shell {
  max-width: 820px;
  margin: 0 auto;
}

.schulte-size-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.schulte-size-btn.active {
  color: #fff;
  border-color: var(--tool-accent);
  background: linear-gradient(135deg, var(--tool-accent) 0%, var(--tool-accent-strong) 100%);
}

.schulte-board-shell {
  margin: 14px 0;
  padding: 12px;
  border-radius: 20px;
  border: 1px dashed #cfe0f4;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
}

.schulte-board {
  --schulte-size: 5;
  display: grid;
  grid-template-columns: repeat(var(--schulte-size), minmax(0, 1fr));
  width: min(100%, 560px, calc(100vh - 330px));
  margin: 0 auto;
  gap: 8px;
}

.schulte-board.is-idle {
  opacity: 0.88;
}

.schulte-cell {
  aspect-ratio: 1;
  border: 1px solid #d6e5f7;
  border-radius: 16px;
  background: #fff;
  color: #20415e;
  font-size: clamp(15px, 1.4vw, 24px);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.schulte-cell:hover {
  transform: translateY(-1px);
  border-color: #b8d2f2;
  box-shadow: 0 12px 26px rgba(47, 128, 237, 0.12);
}

.schulte-cell.is-done {
  background: linear-gradient(135deg, #dff7e9 0%, #f0fbf4 100%);
  color: #2c7a46;
  border-color: #b5e4c7;
}

.schulte-cell.is-wrong {
  animation: schulte-shake 0.24s ease;
  border-color: #e59ea1;
  background: #fff4f5;
}

@keyframes schulte-shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

@media (max-width: 760px) {
  .schulte-shell {
    max-width: 100%;
  }

  .schulte-board-shell {
    padding: 10px;
  }

  .schulte-board {
    width: min(100%, calc(100vw - 48px), calc(100vh - 300px));
    gap: 6px;
  }

  .schulte-cell {
    border-radius: 12px;
  }
}
