body {
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 0;
}

/* Board wrapper és label-ek */
#board-wrapper {
  position: relative;
  width: 480px;
  margin: 20px auto;
}

/* Top és bottom file label-ek */
.file-labels {
  display: flex;
  justify-content: space-between;
  width: 480px;
  font-weight: bold;
  text-align: center;
  margin: 0 auto;
}

#file-labels-top {
  position: absolute;
  top: -25px;
  left: 0;
}

#file-labels-bottom {
  position: absolute;
  bottom: -25px;
  left: 0;
}

/* Left és right rank label-ek */
.rank-labels {
  position: absolute;
  height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-weight: bold;
  text-align: center;
  width: 20px;
}

#rank-labels-left {
  left: -25px;
  top: 0;
}

#rank-labels-right {
  right: -25px;
  top: 0;
}

/* Ha a board-wrapper kap "flipped-labels", a file és rank címkék sorrendje megfordul */
.flipped-labels .file-labels {
  flex-direction: row-reverse;
}

.flipped-labels .rank-labels {
  flex-direction: column-reverse;
}

/* Board container */
#board-container {
  position: relative;
  width: 480px;
  height: 480px;
  margin: 0;
}

/* Board */
#board {
  width: 480px;
  height: 480px;
  border: 2px solid #333;
  margin: 0 auto;
  position: relative;
}

/* Captured pieces konténerek */
.captured-pieces {
  width: 80px;
  min-height: 480px;
  display: inline-block;
  vertical-align: top;
}

#captured-opponent {
  float: left;
  text-align: left;
}

#captured-self {
  float: right;
  text-align: right;
}

/* Mezők: alternáló színek */
.square {
  width: 60px;
  height: 60px;
  float: left;
  box-sizing: border-box;
  border: 1px solid #999;
}

.white {
  background-color: #f0d9b5;
}

.black {
  background-color: #b58863;
}

/* Flipped board */
.flipped {
  transform: rotate(180deg);
}

.flipped .piece {
  transform: rotate(180deg);
}

/* Jelölések */
.highlight {
  outline: 3px solid yellow;
}

.last-move {
  background-color: rgba(0, 255, 0, 0.3) !important;
}

/* Egyéb stílusok */
.controls {
  margin: 20px auto;
  max-width: 900px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.controls button,
.controls select {
  padding: 8px 10px;
}

.controls label {
  font-weight: bold;
}

#status {
  margin: 10px;
  font-weight: bold;
}

.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 300px;
}

.promotion-options img {
  width: 50px;
  height: 50px;
  margin: 5px;
  cursor: pointer;
  border: 2px solid transparent;
}

.promotion-options img:hover {
  border-color: #333;
}

#documentation {
  margin: 20px;
  text-align: left;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
