.wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.main-layout-container {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding-top: 40px;
}

.content-area {
  flex: 1;
  min-width: 0;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 24px;
}

.sidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ad-unit {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
}

@media (max-width: 1024px) {
  .main-layout-container {
    flex-direction: column;
    align-items: center;
  }

  .sidebar {
    width: 100%;
    max-width: 600px;
  }
}

h1 {
  text-align: center;
  margin-bottom: 24px;
}

#status,
#game-status {
  text-align: center;
  margin: 12px 0;
  font-size: 1.1em;
}

.board {
  display: grid;
  grid-template-columns: repeat(8, 70px);
  grid-template-rows: repeat(8, 70px);
  gap: 0;
  justify-content: center;
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
}

.cell {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}

.cell.light {
  background: #f0d9b5;
}

.cell.dark {
  background: #b58863;
}

.cell.selected {
  box-shadow: inset 0 0 0 4px #4caf50;
}

.cell.valid-move {
  box-shadow: inset 0 0 0 4px #2196f3;
}

.cell.valid-move::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(33, 150, 243, 0.4);
  border-radius: 50%;
}

.cell.must-jump {
  animation: pulse-jump 1.5s ease-in-out infinite;
  box-shadow: inset 0 0 0 3px #ff9800;
}

@keyframes pulse-jump {

  0%,
  100% {
    box-shadow: inset 0 0 0 3px #ff9800;
  }

  50% {
    box-shadow: inset 0 0 0 5px #ff5722;
  }
}

.piece {
  user-select: none;
}

#restart {
  display: block;
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 1em;
  border-radius: 6px;
  border: none;
  background: #0077cc;
  color: #fff;
  cursor: pointer;
}

#restart:hover {
  background: #005fa3;
}

/* Mobile responsive styles */
@media (max-width: 600px) {
  .container {
    margin: 20px auto;
    padding: 16px;
    border-radius: 8px;
  }

  h1 {
    font-size: 1.5em;
    margin-bottom: 16px;
  }

  .board {
    grid-template-columns: repeat(8, 40px);
    grid-template-rows: repeat(8, 40px);
    margin: 12px 0;
  }

  .cell {
    width: 40px;
    height: 40px;
    font-size: 2em;
  }

  #status,
  #game-status {
    font-size: 1em;
    margin: 8px 0;
  }

  #player-names {
    font-size: 0.9em;
  }

  #player-names span {
    min-width: 80px !important;
  }

  #player-names img,
  #player-names div[style*="border-radius: 50%"] {
    width: 24px !important;
    height: 24px !important;
  }
}

@media (max-width: 400px) {
  .container {
    margin: 10px;
    padding: 12px;
  }

  h1 {
    font-size: 1.3em;
  }

  .board {
    grid-template-columns: repeat(8, 35px);
    grid-template-rows: repeat(8, 35px);
  }

  .cell {
    width: 35px;
    height: 35px;
    font-size: 1.6em;
  }

  #player-names {
    font-size: 0.85em;
  }

  #player-names span {
    min-width: 60px !important;
    margin-left: 6px !important;
    margin-right: 6px !important;
  }

  #player-names img,
  #player-names div[style*="border-radius: 50%"] {
    width: 20px !important;
    height: 20px !important;
  }

  #timer-container {
    font-size: 0.9em;
  }
}