* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 25px auto;
  color: #333;
}

.container *{
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 25px;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 5px;
}

header  p{
  font-size: 1rem;
  opacity: 0.9;
  max-width: 95%;
  margin: 0 auto;
}
.main{
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.game-section {
  flex: 1;
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.info-section {
  width: 500px;
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.game-title {
  font-size: 24px;
  margin-bottom: 20px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  width: 650px;
  height: 650px;
  margin: 0 auto;
  background-color: #0d7a4a;
  border: 4px solid #075e38;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.game-board:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
  opacity: 0.2;
  pointer-events: none;
}

.cell {
  border: 1px solid #0a5c3a;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s;
  z-index: 2;
}

.cell:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.cell.valid-move:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  z-index: 1;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.4;
  }

  100% {
    transform: scale(1);
    opacity: 0.7;
  }
}

.piece {
  /*width: 80%;
  height: 80%;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
  font-size: 32px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;*/
  font-size: 50px;
  transition: transform 0.3s ease;
}

.piece.flipping {
  animation: flip 0.6s ease forwards;
}

@keyframes flip {
  0% {
    transform: scaleY(1);
  }

  50% {
    transform: scaleY(0);
  }

  100% {
    transform: scaleY(1);
  }
}

/*.black-piece {
  background: linear-gradient(145deg, #333, #000);
  color: white;
}

.white-piece {
  background: linear-gradient(145deg, #f9f9f9, #e0e0e0);
  color: #555;
}*/

.controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

button {
  padding: 12px 30px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#restart-btn {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

#hint-btn {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
}

.mode-buttons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 20px;
}

.mode-btn {
  border: 1px solid #ddd;
  color: #666;
}

.mode-btn.active {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
  color: #fff;
  border: none;
}

.status {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  text-align: center;
}

.player {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  width: 45%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.player:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: #3498db;
  opacity: 0;
  transition: opacity 0.3s;
}

.player.active:before {
  opacity: 1;
}

.player.active {
  border-color: #3498db;
  background: #e3f2fd;
  transform: scale(1.03);
}

.player h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #2c3e50;
}

.score {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 5px;
}

.black-score {
  color: #111;
}

.white-score {
  color: #444;
}

.current-player {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
  padding: 15px;
  background: #e3f2fd;
  border-radius: 10px;
  border-left: 5px solid #3498db;
}

.section-title {
  font-size: 24px;
  margin-bottom: 20px;
  color: #2c3e50;
  padding-bottom: 10px;
  border-bottom: 2px solid #3498db;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rules-list {
  list-style-type: none;
  padding: 0 15px;
}

.rules-list li {
  margin-bottom: 16px;
  padding-left: 25px;
  position: relative;
  font-size: 17px;
}

.rules-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #3498db;
  font-size: 24px;
}

.tips {
  background: #fff8e1;
  padding: 15px;
  border-radius: 10px;
  border-left: 4px solid #f39c12;
  margin-bottom: 20px;
}

.tips h4 {
  margin-bottom: 10px;
  color: #e67e22;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tips p{
  font-size: 14px;
  margin-top: 8px;
}
.message {
  text-align: center;
  font-size: 18px;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
  background: #e3f2fd;
  color: #2980b9;
  font-weight: 500;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.win-message {
  background: #4CAF50;
  color: white;
  animation: celebrate 2s infinite;
}

@keyframes celebrate {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }

  100% {
    transform: scale(1);
  }
}

.footer {
  text-align: center;
  color: #7f8c8d;
  font-size: 15px;
}

.ai-thinking {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
  color: #e67e22;
}

.ai-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(230, 126, 34, 0.3);
  border-radius: 50%;
  border-top: 3px solid #e67e22;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.difficulty-selector {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.difficulty-btn {
  border: 1px solid #ddd;
  color: #666;
  padding: 10px 20px;
}

.difficulty-btn.active {
 background: linear-gradient(135deg, #1abc9c, #16a085);
 color: white;
}

.des-section{
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 25px;
}
