html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f9f9f9;
  display: flex;
  flex-direction: column;
}

header {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 10px 0;
  font-size: 75%;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Šachovnice (pouze na play.html) */
#chessboard {
  display: grid;
  grid-template-columns: repeat(8, 60px);
  grid-template-rows: repeat(8, 60px);
  gap: 2px;
  border: 2px solid #333;
  margin-bottom: 20px;
}

/* Menu (na index.html) */
#menu {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Seznam her (na load.html) */
#gameList {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

/* Ovládací tlačítka (na play.html) */
#controls {
  display: flex;
  gap: 10px;
}

/* Styl buněk šachovnice */
.cell {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
  box-sizing: border-box;
  position: relative; /* Požadováno pro pozicování překryvného pseudo-elementu */

  /* Dřevěný motiv – zkontrolujte, že cesta k obrázku odpovídá vaší struktuře */
  background-image: url('wood_texture.jpg');
  background-size: cover;
  background-position: center;
  user-select: none;
}

/* Bílé a černé políčka s barevným overlayem */
.white {
  background-blend-mode: multiply;
  background-color: rgba(238, 238, 210, 0.7);
}
.black {
  background-blend-mode: multiply;
  background-color: rgba(118, 150, 86, 0.7);
}

/* Vybraná buňka – půhledný žlutý překryv přes celý čtvereček */
.cell.selected::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 0, 0.3); /* 30% neprůhledná žlutá */
  pointer-events: none;
}

/* Styl tlačítek */
button {
  padding: 8px 16px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
}

/* Footer */
footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 10px 0;
}

/* Responsivní úpravy pro menší obrazovky */
@media (max-width: 480px) {
  #chessboard {
    grid-template-columns: repeat(8, 40px);
    grid-template-rows: repeat(8, 40px);
  }
  .cell {
    width: 40px;
    height: 40px;
    font-size: 1.2em;
  }
  button {
    font-size: 14px;
    padding: 6px 12px;
  }
}

.hidden {
  display: none;
}

/*označení pro legal moves*/
.cell.highlight::after {
  content: "";
  position: absolute;
  width: 33%;
  height: 33%;
  background-color: rgba(0, 0, 0, 0.5); /* 50% průhledná černá */
  border-radius: 50%; /* Udělá z čtvercového boxu kruh */
}

.cell.highlightTake::after {
  content: "";
  position: absolute;
  width: 85%;
  height: 85%;
  border: 5px solid rgba(0, 0, 0, 0.5); /* 2px černý obrys s 50% průhledností */
  border-radius: 50%;
}


/* Stylování promočního menu */
#promotionMenu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #f2f2f2;  /* neutrální světlá barva */
  border: 2px solid #333;
  text-align: center;
  z-index: 10;
}

/* Kontejner s promočními tlačítky – 4 sloupce v jednom řádku */
.promotion-grid {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  justify-content: center;
}

.promotion-btn {
  background: #ddd;       /* neutrální barva políčka */
  border: 1px solid  #333;
  width: 80px;
  height: 80px;
  position: relative;
  cursor: pointer;
  outline: none;
  border-radius: 0;
  font-size: 3em;
  color: black;
}

.status {
  margin-top: 10px;
  font-size: 18px;
  font-weight: bold;
}
