body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #111;
  color: #fff;
  overflow-x: hidden;
}

.hero {
  display: flex;
  height: 100vh;
  position: relative;
  animation: fadeIn 2s ease-in-out;
}

.hero .side {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: bold;
  transition: transform 0.5s, box-shadow 0.5s;
}

.hero .human {
  background: #fdf6e3;
  color: #111;
}

.hero .ai {
  background: #222;
  color: #0ff;
}

.hero .side:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

.section {
  padding: 50px 20px;
  text-align: center;
}

.arena {
  background: #1a1a1a;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0,255,255,0.3);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* ✅ Chessboard battle effect */
.arena::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.05) 75%),
              linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.05) 75%);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  z-index: 0;
  animation: chessMove 4s linear infinite;
  border-radius: 15px;
}

@keyframes chessMove {
  from { background-position: 0 0, 20px 20px; }
  to { background-position: 40px 0, 60px 20px; }
}

.arena * {
  position: relative;
  z-index: 1;
}

.arena input {
  padding: 10px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  margin-top: 10px;
}

.arena button {
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background: #0ff;
  color: #111;
  cursor: pointer;
  margin: 10px;
  transition: transform 0.2s, background 0.3s;
}

.arena button:hover {
  background: #06cfcf;
  transform: scale(1.1);
}

/* ✅ Scoreboard flash */
.scoreboard {
  margin-top: 20px;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.scoreboard.flash {
  color: #ffd700;
  text-shadow: 0 0 10px #ffd700;
  animation: flashScore 0.5s ease;
}

@keyframes flashScore {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.timer {
  margin-top: 15px;
  font-size: 1.3rem;
  color: #ff4444;
}

.intro-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffd700;
  display: none;
  animation: fadeInScale 2s ease-in-out;
}

/* ✅ Shake effect for status messages */
#status.shake {
  display: inline-block;
  animation: shake 0.5s;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

@keyframes fadeInScale {
  0% {opacity: 0; transform: scale(0.5);}
  100% {opacity: 1; transform: scale(1);}
}