* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(270deg, #00c853, #2196f3);
  background-size: 400% 400%;
  animation: gradientShift 10s ease infinite;
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

header, footer {
  text-align: center;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.4);
}

header h1 {
  font-size: 2rem;
  letter-spacing: 1px;
}

footer p {
  font-size: 1rem;
}

main {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#chessboard {
  width: 480px;
  height: 480px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  border: 4px solid #fff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.square {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.white {
  background-color: #f0d9b5;
}

.black {
  background-color: #b58863;
}

.square img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

#promotion-modal {
  background: white;
  color: black;
  border: 1px solid #999;
  padding: 10px;
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.hidden {
  display: none;
}