.cg-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  display: block;
}

cg-board {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  line-height: 0;
  background-size: cover;
  cursor: pointer;
  z-index: 1;
}

cg-board square {
  position: absolute;
  top: 0;
  left: 0;
  width: 12.5%;
  height: 12.5%;
  pointer-events: none;
}

cg-board piece {
  position: absolute;
  top: 0;
  left: 0;
  width: 12.5%;
  height: 12.5%;
  background-size: cover;
  z-index: 2;
  will-change: transform;
  pointer-events: none;
}

cg-board square.move-dest {
  background: radial-gradient(rgba(20, 85, 30, 0.5) 19%, rgba(0, 0, 0, 0) 20%);
  pointer-events: auto;
}

cg-board square.premove-dest {
  background: radial-gradient(rgba(20, 30, 85, 0.5) 19%, rgba(0, 0, 0, 0) 20%);
  pointer-events: auto;
}

cg-board square.oc.move-dest {
  background: radial-gradient(transparent 0%, transparent 80%, rgba(20, 85, 0, 0.3) 80%);
}

cg-board square.oc.premove-dest {
  background: radial-gradient(transparent 0%, transparent 80%, rgba(20, 30, 85, 0.2) 80%);
}

.cg-wrap piece.ghost {
  opacity: 0.3;
}

cg-board square.last-move {
  background-color: rgba(205, 210, 106, 0.6); /* ✅ צהוב כמו Chess.com - Study mode (default) */
}

/* ✅ Analytics mode - lastMove colors based on marker type (using data attribute on .cg-wrap) */
.cg-wrap[data-last-move-marker="brilliant"] cg-board square.last-move {
  background-color: rgba(11, 187, 255, 0.5) !important; /* Cyan - Brilliant */
}

.cg-wrap[data-last-move-marker="great"] cg-board square.last-move {
  background-color: rgba(59, 130, 246, 0.5) !important; /* Blue - Great */
}

.cg-wrap[data-last-move-marker="best"] cg-board square.last-move {
  background-color: rgba(74, 222, 128, 0.5) !important; /* Green - Best */
}

.cg-wrap[data-last-move-marker="good"] cg-board square.last-move {
  background-color: rgba(6, 182, 212, 0.5) !important; /* Cyan - Good */
}

.cg-wrap[data-last-move-marker="inaccuracy"] cg-board square.last-move {
  background-color: rgba(245, 158, 11, 0.5) !important; /* Amber - Inaccuracy */
}

.cg-wrap[data-last-move-marker="mistake"] cg-board square.last-move {
  background-color: rgba(249, 115, 22, 0.5) !important; /* Orange - Mistake */
}

.cg-wrap[data-last-move-marker="blunder"] cg-board square.last-move {
  background-color: rgba(254, 105, 105, 0.5) !important; /* Red - Blunder */
}

/* ✅ משבצת היעד (השנייה) תהיה יותר שקופה */
cg-board square.last-move:nth-of-type(2) {
  opacity: 0.7 !important;
}

cg-board square.selected {
  background-color: rgba(20, 85, 30, 0.5);
}

cg-board square.check {
  background: radial-gradient(ellipse at center, rgba(255, 0, 0, 1) 0%, rgba(231, 0, 0, 1) 25%, rgba(169, 0, 0, 0) 89%, rgba(158, 0, 0, 0) 100%);
}

/* הוסר: כל חוקי coords, ranks, files, ו-border-radius הועברו ל-chess-board-coords.css */

cg-board square.move-dest {
  z-index: 3 !important;
}
