@import url("https://fonts.googleapis.com/css?family=Press+Start+2P&display=swap");

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

html {
  font-size: 62.5%;
  box-sizing: border-box;
}

body {
  font-family: "Press Start 2P", sans-serif;
  color: #00ff88;
  background: radial-gradient(circle at top, #000000, #0a0f0a, #001100);
  height: 100vh;
  overflow: hidden;
}

/* LAYOUT */
header {
  position: relative;
  height: 35vh;
  border-bottom: 4px solid #00ff88;
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

main {
  height: 65vh;
  color: #00ff88;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 6rem; /* ✅ space between input box and guessing text */
}

/* LEFT & RIGHT PANELS */
.left {
  width: 52rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.right {
  width: 52rem;
  font-size: 2rem;
  text-shadow: 0 0 10px #00ff88;
}

/* HEADING */
h1 {
  font-size: 4rem;
  text-align: center;
  position: absolute;
  width: 100%;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #00ff88;
  text-shadow: 0 0 15px #00ff88, 0 0 30px #00cc66;
  animation: flicker 2.5s infinite;
}

@keyframes flicker {
  0%,
  18%,
  22%,
  25%,
  53%,
  57%,
  100% {
    text-shadow: 0 0 5px #00ff88, 0 0 20px #00ff88, 0 0 30px #00cc66;
  }
  20%,
  24%,
  55% {
    text-shadow: none;
  }
}

/* NUMBER BOX */
.number {
  background: #000;
  color: #00ff88;
  font-size: 6rem;
  width: 15rem;
  padding: 3rem 0rem;
  text-align: center;
  border: 2px solid #00ff88;
  border-radius: 4px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
  box-shadow: 0 0 25px #00ff88, inset 0 0 15px #003322;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 10px #00ff88, inset 0 0 5px #004422;
  }
  50% {
    box-shadow: 0 0 30px #00ff88, inset 0 0 15px #007744;
  }
}

/* INFO TEXT */
.between {
  font-size: 1.4rem;
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: #00cc66;
  text-shadow: 0 0 5px #00ff88;
}

.again {
  position: absolute;
  top: 2rem;
  left: 2rem;
}

/* INPUT */
.guess {
  background: #000;
  border: 3px solid #00ff88;
  font-family: inherit;
  color: #00ff88;
  font-size: 5rem;
  padding: 2.5rem;
  width: 25rem;
  text-align: center;
  display: block;
  margin-top: 6rem; /* ✅ space between ? box and input */
  margin-bottom: 3rem;
  border-radius: 6px;
  box-shadow: 0 0 12px #00ff88, inset 0 0 8px #003322;
}

.guess:focus {
  outline: none;
  border-color: #00ffaa;
  box-shadow: 0 0 20px #00ffaa, inset 0 0 10px #006644;
}

/* BUTTONS */
.btn {
  border: 2px solid #00ff88;
  background: #000;
  color: #00ff88;
  font-size: 2rem;
  font-family: inherit;
  padding: 2rem 3rem;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 0 15px #00ff88;
  transition: all 0.25s ease;
}

.btn:hover {
  background: #003322;
  color: #00ffaa;
  box-shadow: 0 0 25px #00ffaa;
  transform: scale(1.05);
}

/* GAME TEXT */
.message {
  margin-bottom: 8rem;
  height: 3rem;
  color: #00ffaa;
  text-shadow: 0 0 10px #00ff88;
}

.label-score {
  margin-bottom: 2rem;
}

.label-score,
.label-highscore {
  color: #00cc66;
  text-shadow: 0 0 5px #00ff88;
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
  main {
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem;
    text-align: center;
    gap: 3rem; /* ✅ vertical gap when stacked */
  }

  .left,
  .right {
    width: 100%;
  }

  .guess {
    width: 20rem;
    font-size: 3rem;
    padding: 2rem;
    margin-top: 8rem;
  }

  .btn {
    font-size: 1.6rem;
    padding: 1.5rem 2rem;
  }

  .number {
    font-size: 4rem;
    width: 10rem;
    padding: 2rem 0;
  }

  h1 {
    font-size: 2.6rem;
  }
}

@media (max-width: 500px) {
  h1 {
    font-size: 2rem;
  }

  .guess {
    width: 16rem;
    font-size: 2.5rem;
    margin-top: 9rem;
  }

  .btn {
    font-size: 1.4rem;
    padding: 1rem 1.5rem;
  }

  .number {
    font-size: 3.5rem;
    width: 9rem;
    padding: 1.5rem 0;
  }

  .right {
    font-size: 1.6rem;
  }
}
