* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #1a1a1a;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

#game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 800px;
  width: 100%;
}

#status-bar {
  background-color: #333;
  padding: 15px 20px;
  border-radius: 8px;
  text-align: center;
  width: 100%;
  border: 2px solid #555;
}

#current-player {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #4da6ff;
}

#instructions {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 8px;
}

#game-message {
  font-size: 18px;
  font-weight: bold;
  color: #4caf50;
  min-height: 25px;
}

#game-canvas {
  border: 3px solid #555;
  background-color: #0a0a0a;
  border-radius: 8px;
  display: block;
  width: 100%;
  height: 600px;
  max-width: 800px;
}

#controls-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  align-items: center;
}

#rotation-controls {
  background-color: #333;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #555;
  width: 100%;
}

#rotation-controls h3 {
  margin-bottom: 15px;
  font-size: 16px;
  color: #4da6ff;
}

.rotation-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  gap: 8px;
}

.rotation-btn {
  padding: 10px;
  font-size: 14px;
  font-weight: bold;
  background-color: #4da6ff;
  color: #000;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rotation-btn:hover {
  background-color: #66b3ff;
  transform: scale(1.05);
}

.rotation-btn:active {
  transform: scale(0.95);
}

#reset-btn {
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  background-color: #ff6b6b;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#reset-btn:hover {
  background-color: #ff8787;
  transform: scale(1.05);
}

#reset-btn:active {
  transform: scale(0.95);
}

@media (max-width: 600px) {
  #game-container {
    gap: 15px;
  }

  #current-player {
    font-size: 18px;
  }

  #instructions {
    font-size: 12px;
  }

  .rotation-buttons {
    grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
    gap: 6px;
  }

  .rotation-btn {
    padding: 8px;
    font-size: 12px;
  }
}
