body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background: #f0f0f0;
}

body.disco-theme {
  background: #000;
}

body.snow-theme {
  background: #708090;  /* slate blue */
}

body.desert-theme {
  background: #d2b48c;  /* khaki tan color */
}

.container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.board-container {
  width: 560px;
  height: 560px;
  position: relative;
}

#board {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  border: 2px solid #333;
}

#board.snow {
  background: #708090;
}

.square {
  width: 100%;
  height: 0;
  padding-bottom: 100%; /* This ensures square aspect ratio */
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.square.white {
  background: #fff;
}

.square.black {
  background: #999;
}

.square.selected {
  background: #7389ae !important;
}

.square.valid-move {
  position: relative;
}

.square.valid-move::after {
  content: '';
  position: absolute;
  width: 25%;
  height: 25%;
  background: rgba(0, 255, 0, 0.3);
  border-radius: 50%;
}

.piece {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  transition: all 0.2s;
}

.piece svg {
  width: 100%;
  height: 100%;
}

.captured {
  min-height: 30px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 5px;
  background: #fff;
  border: 1px solid #ccc;
  margin: 5px 0;
}

.captured .piece {
  position: relative;
  top: auto;
  left: auto;
  width: 25px;
  height: 25px;
}

#move-history {
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  background: #fff;
  border: 1px solid #ccc;
}

#status {
  font-weight: bold;
  margin-left: 10px;
}

select, button {
  padding: 8px;
  font-size: 14px;
}

.theme-selector {
  margin-right: 10px;
}

.theme-selector:focus {
  outline: none;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1);
}

/* Add theme styles */
.board.classic {
  border-color: #333;
}
.board.classic .square.white { background: #fff; }
.board.classic .square.black { background: #999; }
.board.classic .square.selected { background: #7389ae !important; }

.board.forest {
  border-color: #2c4f1d;
}
.board.forest .square.white { background: #e8f0cd; }
.board.forest .square.black { background: #4a7c3a; }
.board.forest .square.selected { background: #8fbd6f !important; }

.board.ocean {
  border-color: #1a3f54;
}
.board.ocean .square.white { background: #e3f2f7; }
.board.ocean .square.black { background: #457b9d; }
.board.ocean .square.selected { background: #78a7c2 !important; }

.board.desert {
  border-color: #8b4513;
}
.board.desert .square.white { background: #f4deb3; }
.board.desert .square.black { background: #b08968; }
.board.desert .square.selected { background: #d4a373 !important; }

/* Update neon disco theme */
.board.disco {
  border-color: #000;
  background: #000;
}

.board.disco .square {
  transition: all 0.5s;
  position: relative; 
}

.board.disco .square.white {
  background: #1a1a1a;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.board.disco .square.black {
  background: #000;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.board.disco .square.glow {
  animation: neonGlow 1s infinite;
  background: rgba(255, 0, 222, 0.2); 
  z-index: 1; 
}

@keyframes neonGlow {
  0% {
    background: rgba(255, 0, 222, 0.2);
    box-shadow: 0 0 5px #fff,
                0 0 10px #fff,
                0 0 15px #fff,
                0 0 20px #ff00de,
                0 0 35px #ff00de,
                0 0 40px #ff00de,
                0 0 50px #ff00de,
                0 0 75px #ff00de;
  }
  50% {
    background: rgba(255, 0, 222, 0.1);
    box-shadow: 0 0 2.5px #fff,
                0 0 5px #fff,
                0 0 7.5px #fff,
                0 0 10px #ff00de,
                0 0 17.5px #ff00de,
                0 0 20px #ff00de,
                0 0 25px #ff00de,
                0 0 37.5px #ff00de;
  }
  100% {
    background: rgba(255, 0, 222, 0.2);
    box-shadow: 0 0 5px #fff,
                0 0 10px #fff,
                0 0 15px #fff,
                0 0 20px #ff00de,
                0 0 35px #ff00de,
                0 0 40px #ff00de,
                0 0 50px #ff00de,
                0 0 75px #ff00de;
  }
}

.board.disco .square.selected {
  background: #2a0a2a !important;
  box-shadow: 0 0 15px #ff00de;
  z-index: 1; 
}

.board.disco .piece svg {
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 5px #ff00de);
  position: relative; 
  z-index: 2; 
}

/* Update snow theme */
.board.snow {
  border-color: #b4c4d4;
}

.board.snow .square.white { 
  background: #e8f4ff;
}

.board.snow .square.black { 
  background: #b4c4d4; 
}

.board.snow .square.selected { 
  background: #98b6cf !important; 
}

/* Enhanced Laser show container */
.laser-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  perspective: 1000px;
}

body.disco-theme .laser-container {
  display: block;
}

/* Enhanced laser effects */
.laser {
  position: absolute;
  width: 3px;
  height: 100vh;
  background: linear-gradient(180deg, 
    rgba(255,255,255,0) 0%,
    currentColor 50%,
    rgba(255,255,255,0) 100%);
  filter: blur(1px);
  transform-origin: top;
  opacity: 0.8;
  box-shadow: 
    0 0 10px currentColor,
    0 0 20px currentColor,
    0 0 30px currentColor;
}

/* Left side enhanced lasers */
.laser.left {
  left: 0;
  animation: laserMoveLeft 8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.laser.left:nth-child(1) {
  color: #ff0000;
  animation-delay: -1s;
}

.laser.left:nth-child(2) {
  color: #00ff00;
  animation-delay: -2s;
}

.laser.left:nth-child(3) {
  color: #0000ff;
  animation-delay: -3s;
}

.laser.left:nth-child(4) {
  color: #ff00ff;
  animation-delay: -4s;
}

.laser.left:nth-child(5) {
  color: #ffff00;
  animation-delay: -5s;
}

.laser.left:nth-child(6) {
  color: #00ffff;
  animation-delay: -6s;
}

/* Right side enhanced lasers */
.laser.right {
  right: 0;
  animation: laserMoveRight 8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.laser.right:nth-child(7) {
  color: #ff3300;
  animation-delay: -1s;
}

.laser.right:nth-child(8) {
  color: #33ff00;
  animation-delay: -2s;
}

.laser.right:nth-child(9) {
  color: #0033ff;
  animation-delay: -3s;
}

.laser.right:nth-child(10) {
  color: #ff00cc;
  animation-delay: -4s;
}

.laser.right:nth-child(11) {
  color: #ffcc00;
  animation-delay: -5s;
}

.laser.right:nth-child(12) {
  color: #00ffcc;
  animation-delay: -6s;
}

/* Enhanced laser animations */
@keyframes laserMoveLeft {
  0% {
    transform: translateX(-100%) rotate(30deg) rotateY(0deg);
  }
  25% {
    transform: translateX(100px) rotate(-45deg) rotateY(45deg);
  }
  50% {
    transform: translateX(200px) rotate(60deg) rotateY(-45deg);
  }
  75% {
    transform: translateX(100px) rotate(-30deg) rotateY(30deg);
  }
  100% {
    transform: translateX(-100%) rotate(30deg) rotateY(0deg);
  }
}

@keyframes laserMoveRight {
  0% {
    transform: translateX(100%) rotate(-30deg) rotateY(0deg);
  }
  25% {
    transform: translateX(-100px) rotate(45deg) rotateY(-45deg);
  }
  50% {
    transform: translateX(-200px) rotate(-60deg) rotateY(45deg);
  }
  75% {
    transform: translateX(-100px) rotate(30deg) rotateY(-30deg);
  }
  100% {
    transform: translateX(100%) rotate(-30deg) rotateY(0deg);
  }
}

/* Additional background effects for disco theme */
body.disco-theme::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(255,0,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255,255,0,0.1) 0%, transparent 50%);
  animation: backgroundPulse 8s infinite;
  z-index: -2;
  pointer-events: none;
}

@keyframes backgroundPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* Add disco ball effect */
.disco-ball-container {
  display: none;
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
}

body.disco-theme .disco-ball-container {
  display: block;
}

.disco-ball {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at 50% 50%, 
    #fff 0%, 
    rgba(200,200,200,0) 40%, 
    rgba(150,150,150,0) 60%, 
    rgba(100,100,100,0) 80%, 
    rgba(50,50,50,0) 100%);
  border-radius: 50%;
  box-shadow: 
    inset -5px -5px 10px rgba(0,0,0,0),
    inset 5px 5px 10px rgba(255,255,255,0),
    0 0 20px rgba(255,255,255,0),
    0 0 40px rgba(255,255,255,0),
    0 0 60px rgba(255,255,255,0);
  position: relative;
  animation: discoBallRotate 10s linear infinite;
}

.disco-ball::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background: #666;
}

.disco-ball-light {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* Create multiple reflective surfaces */
.disco-ball-facet {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0);
  border-radius: 2px;
  animation: facetShine 2s infinite;
}

/* Generate 50 facets */
.disco-ball-facets {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: facetsRotate 10s linear infinite;
}

/* Add light beams */
.disco-ball-beams {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.disco-beam {
  position: absolute;
  width: 1px;
  height: 100vh;
  background: linear-gradient(180deg, 
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0) 50%,
    rgba(255,255,255,0) 100%);
  animation: beamSweep 8s infinite;
  transform-origin: top;
  opacity: 0;
}

@keyframes discoBallRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes facetsRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes facetShine {
  0%, 100% { opacity: 0; }
  50% { opacity: 0; }
}

@keyframes beamSweep {
  0% {
    transform: rotate(-60deg);
    opacity: 0;
  }
  25% {
    opacity: 0;
  }
  50% {
    transform: rotate(60deg);
    opacity: 0;
  }
  75% {
    opacity: 0;
  }
  100% {
    transform: rotate(-60deg);
    opacity: 0;
  }
}

/* Add snowfall animation styles */
.snowflake {
  position: fixed;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  animation: snowfall linear forwards;
  opacity: 0.7;
  z-index: -1;
}

@keyframes snowfall {
  0% {
    transform: translateY(-100vh) translateX(0);
    opacity: 0.7;
  }
  
  100% {
    transform: translateY(100vh) translateX(100px);
    opacity: 0;
  }
}