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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.game-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 30px;
  max-width: 600px;
  width: 100%;
  position: relative;
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

.header h1 {
  color: #667eea;
  font-size: 2.5em;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-board {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  margin-top: 15px;
}

.score, .timer {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 10px 25px;
  border-radius: 25px;
  font-size: 1.2em;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.target-color {
  text-align: center;
  margin-bottom: 30px;
}

.target-color p {
  font-size: 1.3em;
  color: #333;
  margin-bottom: 15px;
  font-weight: 600;
}

.color-display {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  border-radius: 50%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border: 5px solid white;
  transition: transform 0.3s ease;
}

.color-display:hover {
  transform: scale(1.05);
}

.game-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.color-option {
  aspect-ratio: 1;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 3px solid transparent;
}

.color-option:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.color-option:active {
  transform: translateY(-2px);
}

.color-option.correct {
  animation: correctPulse 0.5s ease;
  border-color: #4CAF50;
}

.color-option.wrong {
  animation: wrongShake 0.5s ease;
  border-color: #f44336;
}

@keyframes correctPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes wrongShake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

.game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  display: none;
  z-index: 10;
}

.game-over.show {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.game-over h2 {
  color: #667eea;
  font-size: 2.5em;
  margin-bottom: 20px;
}

.game-over p {
  font-size: 1.5em;
  color: #333;
  margin-bottom: 25px;
}

.btn-restart {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 1.2em;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-restart:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-restart:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .game-container {
    padding: 20px;
  }

  .header h1 {
    font-size: 2em;
  }

  .score, .timer {
    font-size: 1em;
    padding: 8px 15px;
  }

  .game-board {
    gap: 10px;
  }
}
