:root {
  --pink: #d95980;
  --blue: #63aac0;
  --orange: #f99b45;
  --purple: #819ff9;
  --dark: #2a2a2a;
  --light: #f8f8f8;
}

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

body {
  font-family: "Press Start 2P", cursive;
  text-align: center;
  background-color: var(--dark);
  color: var(--light);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  max-width: 800px;
  width: 100%;
}

header {
  margin-bottom: 2rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
  color: #fff;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.difficulty {
  display: flex;
  align-items: center;
  gap: 10px;
}

select,
.btn {
  padding: 10px 15px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  background-color: var(--light);
  transition: all 0.3s;
}

.btn {
  background-color: var(--purple);
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.game-info {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 1.5rem;
}

.score-box {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 8px;
  min-width: 150px;
}

.game-container {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.box {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  perspective: 1000px;
}

.square {
  width: calc(50% - 20px);
  max-width: 200px;
  height: 200px;
  border: 8px solid var(--dark);
  border-radius: 20%;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.square:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.pink {
  background-color: var(--pink);
  box-shadow: 0 5px 0 darken(var(--pink), 20%);
}

.blue {
  background-color: var(--blue);
  box-shadow: 0 5px 0 darken(var(--blue), 20%);
}

.orange {
  background-color: var(--orange);
  box-shadow: 0 5px 0 darken(var(--orange), 20%);
}

.purple {
  background-color: var(--purple);
  box-shadow: 0 5px 0 darken(var(--purple), 20%);
}

.flash {
  background-color: white;
  transform: scale(0.95);
  box-shadow: 0 0 30px white;
}

.timer-container {
  width: 100%;
  max-width: 500px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  margin: 0 auto 1.5rem;
  overflow: hidden;
}

.timer-bar {
  height: 100%;
  width: 100%;
  background-color: var(--purple);
  transition: width 0.1s linear;
}

.message {
  min-height: 60px;
  font-size: 1.2rem;
  margin-top: 1rem;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 0.5s;
}

/* Responsive Design */
@media (max-width: 600px) {
  h1 {
    font-size: 1.8rem;
  }

  .square {
    height: 150px;
  }

  .controls {
    flex-direction: column;
    align-items: center;
  }

  .game-info {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 400px) {
  .square {
    height: 120px;
  }
}
