body {
  font-family: 'Roboto', sans-serif;
  background-color: #f0f4f8;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.game-container {
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  text-align: center;
  max-width: 800px;
  width: 100%;
}

.captcha-area {
  margin: 20px 0;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
}

#captcha-image {
  width: 300px;
  height: 100px;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#user-input {
  width: 80%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 2px solid #bdc3c7;
  border-radius: 8px;
  font-size: 1.1rem;
  transition: border-color 0.3s;
}

#user-input:focus {
  border-color: #3498db;
  outline: none;
}

button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s;
}

button:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

#score {
  font-size: 1.4rem;
  font-weight: bold;
  color: #2c3e50;
  margin-top: 1rem;
}

#game-over {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1000;
}

#game-over h2 {
  color: white;
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

#final-score {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

#restart-btn {
  font-size: 1.5rem;
  padding: 1rem 2rem;
  background-color: #2ecc71;
}

#restart-btn:hover {
  background-color: #27ae60;
}

.ad-popup {
  position: absolute;
  background-color: white;
  border: 2px solid #3498db;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 100;
  cursor: move;
  max-width: 200px;
}

.ad-popup img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.close-ad {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: #e74c3c;
  color: white;
  border: 2px solid white;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.leaderboard {
  margin-top: 2rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.leaderboard h2 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

#leaderboard-list {
  max-height: 200px;
  overflow-y: auto;
}

.leaderboard-entry {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  margin: 0.5rem 0;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#object-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.object-item {
  width: 80px;
  height: 80px;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s;
}

.object-item:hover {
  transform: scale(1.05);
}

.object-item.selected {
  border-color: #3498db;
  background-color: #ebf5fb;
}

#object-captcha {
  margin: 20px 0;
  text-align: center;
}

#object-instructions {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 15px;
}

#rotate-captcha {
  margin: 20px 0;
  text-align: center;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
}

#rotate-object {
  width: 150px;
  height: 150px;
  margin: 15px auto;
  display: block;
  background: white;
  border-radius: 50%;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#rotation-slider {
  width: 200px;
  margin: 15px auto;
  display: block;
  -webkit-appearance: none;
  height: 10px;
  border-radius: 5px;
  background: #dfe6e9;
  outline: none;
}

#rotation-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3498db;
  cursor: pointer;
  transition: background .3s ease-in-out;
}

#rotation-slider::-webkit-slider-thumb:hover {
  background: #2980b9;
}

#rotate-instructions {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 15px;
  background: white;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.submit-button {
  display: block;
  margin: 15px auto;
}