:root {
  --cell-size: 80px;
  --gap: 5px;
}

body {
  font-family: sans-serif;
  background-color: #111111;
  text-align: center;
}

.container {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 10px;
}

.board {
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(11, var(--cell-size));
  grid-template-rows: repeat(7, var(--cell-size));
  gap: var(--gap);
  justify-content: center;
  margin-top: 20px;
  position: relative;
}

.board-icon{
  transform: rotate(90deg);
  position: relative;
  left: 780px;
  top: 350px;
  width: 400px;
  height: 180px;
}
.board-icon-2{
  transform: rotate(270deg);
  position: relative;
  left: 20px;
  top: 330px;
  width: 400px;
  height: 180px;
}

.cell {
  position: relative;
  width: var(--cell-size);
  height: var(--cell-size);
  background-color: #ffcc00;
  color: black;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1;
}

.cell-img {
  margin: 7px;
  width: 80%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  opacity: 0.9;
  z-index: 1;
  border-radius: 8px;
}

.cell-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  color: black;
  z-index: 1;
  font-size: 32px;
  pointer-events: none;
}

.cell:nth-child(2n) {
  background-color: #ff0000;
  color: black;
}

.sidebar {
  justify-self: left;
  margin-top: 100px;
  width: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.sidebar_2 {
  justify-self: right;
  margin-top: 100px;
  width: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.icon-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.player-choice {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.player-choice:hover {
  transform: scale(1.1);
  border-color: #333;
}

.player-choice.selected {
  border-color: #ffcc00;
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.4);
}

.player-choice.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.player {
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 35px;
  height: 35px;
  background-color: blue;
  border-radius: 50%;
  border: 2px solid white;
  z-index: 100;
}

.player2 {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 35px;
  height: 35px;
  background-color: green;
  border-radius: 50%;
  border: 2px solid white;
  z-index: 100;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.popup-screen {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(5px);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  text-align: center;
}

.popup-logo {
  width: 700px;
}

.text {
  color: white;
  text-wrap: balance;
  max-width: 80ch;
  font-size: 32px;
}
.text_player1 { color: white; background: blue; border-radius: 8px; }
.text_player2 { color: white; background: green; border-radius: 8px; }

.start-button,
.buttons,
.buttons1,
.buttons2 {
  border: none;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.start-button { background: #ffcc00; padding: 15px 30px; }
.buttons { background: #ffcc00; }
.buttons1 { background: blue; color: white; }
.buttons2 { background: green; color: white; }

.start-button:hover {
  background-color: #ffdd33;
  transform: scale(1.05);
}

.start-button:focus {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

button:focus-visible, .player-choice:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 900px) {
  :root { --cell-size: 64px; }
  .popup-logo { width: 480px; }
  .container { flex-wrap: wrap; align-items: flex-start; }
  .sidebar, .sidebar_2 { order: 2; margin-top: 20px; }
  .board { order: 1; }
}

@media (max-width: 600px) {
  :root { --cell-size: 56px; --gap: 4px; }
  .container { gap: 12px; }
  .popup-logo { width: 360px; }
}


