/* --- CHESS PUZZLE --- */
.hc-chess-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: 288px;
  height: 288px;
  border: 2px solid #334155;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  user-select: none;
}

.hc-chess-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  position: relative;
  transition: background 0.12s ease;
}

.hc-chess-cell.light {
  background: #f0d9b5;
}

.hc-chess-cell.dark {
  background: #b58863;
}

/* Selected piece square highlight */
.hc-chess-cell.selected {
  background: #bae6fd !important;
}

/* LEGAL MOVE INDICATOR (Empty square dot) */
.hc-chess-cell.target-hint::after {
  content: '';
  width: 12px;
  height: 12px;
  background: rgba(30, 64, 175, 0.45);
  border-radius: 50%;
  position: absolute;
  pointer-events: none;
  transition: transform 0.15s ease;
}

.hc-chess-cell.target-hint:hover::after {
  transform: scale(1.3);
  background: rgba(30, 64, 175, 0.7);
}

/* LEGAL CAPTURE INDICATOR (Target has enemy piece) */
.hc-chess-cell.target-capture::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 3px solid rgba(239, 68, 68, 0.7);
  border-radius: 50%;
  pointer-events: none;
}

.hc-chess-piece {
  cursor: grab;
  line-height: 1;
  transition: transform 0.1s ease;
}

.hc-chess-cell.selected .hc-chess-piece {
  transform: scale(1.15);
}

/* --- REACTION TEST --- */
.hc-reaction-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hc-reaction-target {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: #3b82f6;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
  transition: background 0.12s ease, transform 0.05s ease;
  text-align: center;
  padding: 16px;
}

.hc-reaction-target.waiting {
  background: #f59e0b;
}

.hc-reaction-target.ready {
  background: #10b981;
  animation: hc-pulse 0.5s infinite alternate;
}

.hc-reaction-target.error {
  background: #ef4444;
}

.hc-reaction-target:active {
  transform: scale(0.96);
}

@keyframes hc-pulse {
  from { transform: scale(1); box-shadow: 0 0 16px rgba(16, 185, 129, 0.4); }
  to { transform: scale(1.04); box-shadow: 0 0 28px rgba(16, 185, 129, 0.7); }
}

.hc-reaction-timer {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}

/* --- JIGSAW / SLIDER --- */
.hc-jigsaw-canvas-wrap {
  position: relative;
  width: 320px;
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-bottom: 14px;
}

.hc-jigsaw-slider {
  width: 320px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* --- FIND TARGET --- */
.hc-find-canvas-wrap {
  position: relative;
  width: 340px;
  height: 230px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  cursor: crosshair;
}

/* --- SIMON AUDIO PUZZLE --- */
.hc-simon-circle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 220px;
  height: 220px;
  padding: 12px;
  background: #1e293b;
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.hc-simon-pad {
  border: none;
  border-radius: 16px;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.1s ease, transform 0.05s ease, filter 0.1s ease;
}

.hc-simon-pad.green { background: #22c55e; border-top-left-radius: 100px; }
.hc-simon-pad.red { background: #ef4444; border-top-right-radius: 100px; }
.hc-simon-pad.yellow { background: #eab308; border-bottom-left-radius: 100px; }
.hc-simon-pad.blue { background: #3b82f6; border-bottom-right-radius: 100px; }

.hc-simon-pad.lit,
.hc-simon-pad:active {
  opacity: 1;
  filter: brightness(1.4);
  transform: scale(0.96);
}

/* --- 3x3 TILES --- */
.hc-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 320px;
}

.hc-tile-cell {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.hc-tile-cell:hover {
  transform: translateY(-1px);
}

.hc-tile-cell.selected {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.hc-tile-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: transparent;
  transition: all 0.15s ease;
}

.hc-tile-cell.selected .hc-tile-check {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

/* --- 3D CUBES --- */
.hc-cubes-canvas {
  width: 260px;
  height: 200px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.hc-number-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.hc-stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}

.hc-stepper-btn:hover {
  background: #f1f5f9;
}

.hc-stepper-val {
  font-size: 22px;
  font-weight: 700;
  min-width: 48px;
  text-align: center;
}

/* --- ROTATE PUZZLE --- */
.hc-rotate-view {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  position: relative;
}

.hc-rotate-view::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 1px;
  background: rgba(203, 213, 225, 0.6);
  pointer-events: none;
}

.hc-rotate-item {
  width: 120px;
  height: 120px;
  transition: transform 0.15s ease-out;
}

.hc-rotate-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* --- TEXT / MATH --- */
.hc-text-canvas {
  width: 300px;
  height: 100px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
}

.hc-input-text {
  width: 220px;
  font-size: 18px;
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 2px;
  outline: none;
  transition: border-color 0.15s ease;
}

.hc-input-text:focus {
  border-color: var(--primary);
}
