* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.game-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 30px;
  max-width: 800px;
  width: 100%;
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

.header h1 {
  color: #333;
  font-size: 2.5em;
  margin-bottom: 10px;
}

.game-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 20px;
}

.score-board {
  display: flex;
  gap: 20px;
  align-items: center;
}

.score {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-radius: 10px;
  background: #f8f9fa;
}

.score.current-player {
  background: #e3f2fd;
  border: 2px solid #2196f3;
}

.piece {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #333;
}

.piece.black {
  background: #333;
}

.piece.white {
  background: #fff;
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.difficulty-select {
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: white;
  font-size: 14px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #2196f3;
  color: white;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.btn:hover {
  background: #1976d2;
}

.btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  background: #2e7d32;
  padding: 10px;
  border-radius: 10px;
  margin: 20px auto;
  max-width: 480px;
  aspect-ratio: 1;
}

.cell {
  background: #4caf50;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.cell:hover {
  background: #66bb6a;
}

.cell.valid-move {
  background: #81c784;
  box-shadow: inset 0 0 0 2px #2196f3;
}

.cell.valid-move::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(33, 150, 243, 0.3);
  border: 2px dashed #2196f3;
}

.stone {
  width: 80%;
  height: 80%;
  border-radius: 50%;
  border: 2px solid #333;
  transition: all 0.3s;
  animation: placeStone 0.3s ease-out;
}

.stone.black {
  background: radial-gradient(circle at 30% 30%, #555, #000);
}

.stone.white {
  background: radial-gradient(circle at 30% 30%, #fff, #ddd);
}

@keyframes placeStone {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.stats {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
}

.stats h3 {
  margin-bottom: 15px;
  color: #333;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.stat-item {
  text-align: center;
  padding: 10px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-value {
  font-size: 1.5em;
  font-weight: bold;
  color: #2196f3;
}

.stat-label {
  font-size: 0.9em;
  color: #666;
  margin-top: 5px;
}

.game-over {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.game-over-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.game-over h2 {
  margin-bottom: 20px;
  color: #333;
}

.final-score {
  margin: 20px 0;
  font-size: 1.2em;
}

.hidden {
  display: none;
}

@media (max-width: 768px) {
  .game-container {
    padding: 20px;
  }

  .game-info {
    flex-direction: column;
    align-items: stretch;
  }

  .score-board {
    justify-content: center;
  }

  .controls {
    justify-content: center;
  }

  .header h1 {
    font-size: 2em;
  }
}
