* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #1a1a2e;
  background-image: url('../bg-checkers.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #ffffff;
  min-height: 100vh;
  padding: 20px;
  overflow-x: hidden;
}
.top-text-container {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 240, 0.9));
  display: block;
  padding: 25px 40px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin: 0 auto 30px auto;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: fit-content;
}
.top-text-container h1 {
  color: #2c3e50;
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}
.top-text-container p {
  color: #34495e;
  font-size: 1.1em;
  font-weight: 500;
}
.game-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 800px;
  margin: 0 auto 30px auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.player-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  min-width: 180px;
}
.player-card.active {
  border-color: #4CAF50;
  background: rgba(76, 175, 80, 0.2);
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
}
.player-avatar {
  font-size: 2.5em;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}
.player-details h3 {
  font-size: 1.2em;
  margin-bottom: 5px;
  color: #ffffff;
}
.pieces-count {
  font-size: 1em;
  color: #b0b0b0;
  font-weight: 500;
}
.turn-indicator-wrapper {
  text-align: center;
}
#turn-indicator {
  font-size: 1.5em;
  font-weight: 700;
  color: #4CAF50;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.game-status {
  font-size: 1em;
  color: #cccccc;
  font-style: italic;
}
.game-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}
.board-wrapper {
  position: relative;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}
.board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 2px;
  width: 90vw;
  max-width: 600px;
  aspect-ratio: 1;
  background-color: #8B4513;
  border: 4px solid #654321;
  border-radius: 12px;
  padding: 8px;
  position: relative;
}
.square {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.square.light {
  background-color: #F5DEB3;
  background-image: url('../light-square.jpg');
  background-size: cover;
  background-position: center;
}
.square.dark {
  background-color: #8B4513;
  background-image: url('../dark-square.jpg');
  background-size: cover;
  background-position: center;
}
.square:hover {
  transform: scale(1.02);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.3);
}
.square.selected {
  box-shadow: 0 0 15px 3px #FFD700;
  border: 3px solid #FFD700;
  animation: pulse 1s infinite alternate;
}
.square.valid-move {
  box-shadow: 0 0 15px 3px #4CAF50;
  border: 3px solid #4CAF50;
  position: relative;
}
.square.valid-move::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 50%;
  background-color: #4CAF50;
  border-radius: 50%;
  opacity: 0.7;
  animation: moveHint 1.5s ease-in-out infinite;
}
.square.jump-move {
  box-shadow: 0 0 20px 4px #FF5722;
  border: 3px solid #FF5722;
}
.square.jump-move::after {
  background-color: #FF5722;
}
.piece {
  width: 80%;
  height: 80%;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.piece.red {
  background-color: #ff0000;
  background-image: url('../red-piece.jpg');
  background-size: cover;
  background-position: center;
}
.piece.black {
  background-color: #2F2F2F;
  background-image: url('../black-piece.jpg');
  background-size: cover;
  background-position: center;
}
.piece.king {
  border-color: #FFD700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
  position: relative;
}
.piece.king::after {
  content: '♔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5em;
  color: #FFD700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}
.piece:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}
.piece.selected {
  transform: scale(1.15);
  box-shadow: 0 0 20px 4px #FFD700;
  border-color: #FFD700;
  z-index: 10;
}
@keyframes pulse {
  from { transform: scale(1.02); }
  to { transform: scale(1.05); }
}
@keyframes moveHint {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 0.8; transform: scale(1.2); }
}
@keyframes pieceMove {
  0% { transform: scale(1.15); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
@keyframes capture {
  0% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.2) rotate(180deg); opacity: 0.5; }
  100% { transform: scale(0) rotate(360deg); opacity: 0; }
}
@keyframes kingTransform {
  0% { transform: scale(1); }
  50% { transform: scale(1.5) rotate(360deg); }
  100% { transform: scale(1); }
}
.game-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.game-btn {
  padding: 12px 30px;
  font-size: 1.1em;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 140px;
}
.game-btn.primary {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}
.game-btn.primary:hover {
  background: linear-gradient(135deg, #45a049, #3d8b40);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}
.game-btn.secondary {
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}
.game-btn.secondary:hover {
  background: linear-gradient(135deg, #5a6268, #495057);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.6);
}
.game-btn:disabled {
  background: #cccccc;
  color: #666666;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.message-display {
  text-align: center;
  font-size: 1.2em;
  font-weight: 500;
  color: #4CAF50;
  margin-top: 20px;
  min-height: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.mute-button {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  padding: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}
.mute-button:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.4s ease-out;
  max-width: 500px;
  margin: 20px;
}
.fancy-modal {
  border: 3px solid #FFD700;
}
.victory-crown {
  font-size: 4em;
  margin-bottom: 20px;
  animation: crownBounce 2s ease-in-out infinite;
}
.modal-content h2,
.modal-content h3 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 2.2em;
  font-weight: 700;
}
.victory-details {
  color: #34495e;
  font-size: 1.2em;
  margin-bottom: 30px;
}
.victory-buttons,
.move-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.victory-btn,
.move-btn {
  padding: 15px 30px;
  font-size: 1.1em;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 150px;
}
.victory-btn.primary,
.move-btn.primary {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}
.victory-btn.secondary,
.move-btn.secondary {
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}
.victory-btn:hover,
.move-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-50px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes crownBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@media (max-width: 768px) {
  .game-info-bar { flex-direction: column; gap: 20px; }
  .player-card { min-width: auto; justify-content: center; }
  .top-text-container h1 { font-size: 2em; }
  .board { width: 95vw; max-width: 500px; }
  .game-controls { flex-direction: column; align-items: center; }
  .victory-buttons,
  .move-buttons { flex-direction: column; align-items: center; }
}
@media (max-width: 480px) {
  body { padding: 10px; }
  .top-text-container { padding: 20px 25px; }
  .top-text-container h1 { font-size: 1.8em; }
  .modal-content { padding: 30px 20px; margin: 10px; }
}
