* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #eee;
  font-family: Arial, sans-serif;
}

.container {
  height: 100%;              
  display: flex;
  align-items: center;
}

.sidebar {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-right: 10px;
  font-size: 18px;
  font-weight: bold;
  color: #333;
}


.main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  align-items: center;
}


.chessboard {
  display: grid;
  grid-template-columns: repeat(10, 60px);
  grid-template-rows: repeat(10, 60px);
  border: 4px solid #333;
}

.square {
  width: 60px;
  height: 60px;
  position: relative;
}

.white {
  background-color: #f0d9b5;
}

.black {
  background-color: #b58863;
}

.footer {
	padding-top: 15px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pawn-pool {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap; 
  max-width: calc(8 * 60px + 7 * 10px);
}

.pawn-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 60px;
  text-align: center;
}

.pawn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: grab;
  border: 2px solid #444;
}

.pawn-label {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.2;
  height: 28px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #333;
}

.white-pawn { background-color: #fff; }
.black-pawn { background-color: #000; }
.red-pawn { background-color: #c0392b; }
.blue-pawn { background-color: #2980b9; }
.green-pawn { background-color: #27ae60; }

.add-pawn {
  background-color: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
  color: #444;
  cursor: pointer;
}

.square .pawn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 40px;
  height: 40px;
  cursor: default;
}

.score {
	  text-align: center;

  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.slider-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 20px;
  padding: 10px;
  background-color: #f7f7f7;
  border-left: 2px solid #ccc;
  height: 300px;
  justify-content: center;
  font-weight: bold;
  color: #333;
  font-size: 16px;
}

.slider {
  writing-mode: bt-lr;
  -webkit-appearance: slider-vertical;
  width: 20px;
  height: 150px;
  margin: 10px 0;
  opacity: 1; 
  pointer-events: none; 
}
	
#slider-value {
  margin-top: 5px;
}

#floating-label {
  position: absolute;
  pointer-events: none;
  background: rgba(255,255,255,0.9);
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  display: none;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  z-index: 1000;
}

.form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(240, 240, 240, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#pawn-form {
  background: white;
  padding: 20px 30px;
  border-radius: 8px;
  box-shadow: 0 0 10px #aaa;
  font-family: Arial, sans-serif;
}

#pawn-form label {
  display: block;
  margin-bottom: 10px;
}

#pawn-form input {
  width: 100%;
  padding: 6px;
  margin-top: 4px;
}

#pawn-form button {
  padding: 10px 20px;
  font-size: 16px;
  background: #2980b9;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#pawn-list {
  margin-bottom: 10px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ccc;
  padding: 10px;
  background: #f9f9f9;
}

.form-row {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.form-row input {
  flex: 1;
}

#pawn-list div {
  font-size: 14px;
  margin-bottom: 5px;
}

.pawn.optional-pawn {
  border: 2px solid #C71585;
}

#floating-pawn{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: grab;
  border: 2px solid #444;
}

.board-wrapper {
  display: flex;
  
  height: 600px;
}

.row-numbers {
  display: flex;
  flex-direction: column;
  justify-content: space-between; 
  margin-right: 2px;
  font-weight: bold;
  font-size: 13px;
  width: 25px;
  color: #333;
  padding-top: 2px;
  padding-bottom: 2px;
}

.row-numbers div {
  height: 60px;
  display: flex;
  align-items: center; 
  justify-content: center;
}

.board-and-colnums {
  display: flex;
  flex-direction: column;
}

.col-numbers {
  display: grid;
  grid-template-columns: repeat(10, 60px);
  margin-top: 2px;
  margin-right: 6px;
  font-weight: bold;
  font-size: 13px;
  color: #333;
}

.col-numbers div {
  width: 60px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}


