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

.body {
  text-align: center;
  background: linear-gradient(135deg, #0f0f23, #1a1a3a, #2d1b69);
  min-height: 100vh;
  font-family: 'arial', monospace;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s infinite ease-in-out;
}

.simon-dice {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

#level-title {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(1.5rem, 4vw, 3rem);
  margin: 20px;
  color: #00ff88;
  text-shadow:
    0 0 10px #00ff88,
    0 0 20px #00ff88,
    0 0 30px #00ff88;
  animation: glow-pulse 2s ease-in-out infinite alternate;
  text-align: center;
  line-height: 1.2;
}

@keyframes glow-pulse {
  from {
    text-shadow:
      0 0 10px #00ff88,
      0 0 20px #00ff88,
      0 0 30px #00ff88;
  }

  to {
    text-shadow:
      0 0 15px #00ff88,
      0 0 25px #00ff88,
      0 0 35px #00ff88,
      0 0 45px #00ff88;
  }
}

.game-info {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 20px 0;
  flex-wrap: wrap;
}

    .info-item {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 15px 25px;
  border: 2px solid rgba(0, 255, 136, 0.3);
  color: #00ff88;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
}

.info-value {
  font-size: 1.5rem;
  display: block;
  margin-top: 5px;
  color: #ffffff;
}


.container {
  display: block;
  width: min(90vw, 500px);
  margin: 20px auto;
  position: relative;
}


.center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #1a1a3a, #0f0f23);
  border-radius: 50%;
  border: 4px solid #00ff88;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2rem;
  color: #00ff88;
  text-shadow: 0 0 10px #00ff88;
  box-shadow:
    0 0 20px rgba(0, 255, 136, 0.5),
    inset 0 0 20px rgba(0, 255, 136, 0.1);
  z-index: 10;
  transition: all 0.3s ease;
}

.center-logo.active {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow:
    0 0 30px rgba(0, 255, 136, 0.8),
    inset 0 0 20px rgba(0, 255, 136, 0.2);
}


.row {
  display: flex;
  justify-content: center;
  margin: 0;
}


.btn {
  margin: 5px;
  display: inline-block;
  height: 180px;
  width: 180px;
  border: 6px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
}

.btn:hover::before {
  width: 200px;
  height: 200px;
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}


.red {
  background: linear-gradient(135deg, #ff4757, #ff3838);
  border-color: #ff6b7a;
}

.green {
  background: linear-gradient(135deg, #2ed573, #1dd1a1);
  border-color: #55efc4;
}

.blue {
  background: linear-gradient(135deg, #3742fa, #2f3542);
  border-color: #70a1ff;
}

.yellow {
  background: linear-gradient(135deg, #ffa502, #ff6348);
  border-color: #ffd700;
}


.btn.pressed {
  transform: scale(0.95);
  box-shadow:
    inset 0 0 50px rgba(255, 255, 255, 0.3),
    0 0 30px currentColor;
  border-color: white;
}

.btn.active {
  animation: button-flash 0.6s ease-in-out;
  transform: scale(1.1);
}

@keyframes button-flash {
  0% {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    filter: brightness(1);
  }

  50% {
    box-shadow: 0 0 40px currentColor;
    filter: brightness(1.5);
  }

  100% {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    filter: brightness(1);
  }
}

.game-over {
  background: linear-gradient(135deg, #ff4757, #c44569) !important;
  animation: game-over-flash 0.5s ease-in-out;
}

@keyframes game-over-flash {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}


.controls {
  margin: 30px 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.control-btn {
  background: linear-gradient(135deg, #00ff88, #00d4aa);
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  color: white;
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

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

.control-btn:disabled {
  background: #666;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}


.sound-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0, 255, 136, 0.2);
  border: 2px solid #00ff88;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  color: #00ff88;
}

.sound-toggle:hover {
  background: rgba(0, 255, 136, 0.3);
  transform: scale(1.1);
}

.back-to-index {
  background: rgba(175, 224, 179, 0.1);
  }

.instructions {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #00ff88;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.8rem;
  text-align: center;
  border: 1px solid rgba(0, 255, 136, 0.3);
  margin-bottom: 50px;
}


@media (max-width: 768px) {
  .btn {
    height: 140px;
    width: 140px;
    margin: 3px;
  }

  .center-logo {
    width: 90px;
    height: 90px;
    font-size: 0.8rem;
  }

  .game-info {
    gap: 20px;
  }

  .info-item {
    padding: 10px 15px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .btn {
    height: 120px;
    width: 120px;
  }

  .center-logo {
    width: 70px;
    height: 70px;
    font-size: 0.7rem;
  }
}


.score-animation {
  position: absolute;
  font-size: 2rem;
  font-weight: bold;
  color: #00ff88;
  animation: score-float 1s ease-out forwards;
  pointer-events: none;
}

@keyframes score-float {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-50px) scale(1.5);
  }
}