/* ---------------- CSS Reset ---------------- */

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

/* ============================= */
/* BODY */
/* ============================= */

body {
  font-family: "Trebuchet MS", Arial, sans-serif;
  background: linear-gradient(135deg, #b2f0f7, #f4f4f4);
  min-height: 100vh;
}

/* ============================= */
/* HEADER */
/* ============================= */

header {
  text-align: center;
  padding: 20px;
  background-color: #0d6efd;
  color: white;
  letter-spacing: 1px;
}

/* ============================= */
/* OUTER CONTAINER */
/* ============================= */

#container {
  width: 100%;
  padding: 50px 0;
  background-color: aqua;
}

/* ============================= */
/* GAME CARD */
/* ============================= */

#game {
  width: 430px;
  margin: 0 auto;
  padding: 30px;
  background-color: white;
  border-radius: 14px;
  border: 3px solid black;
  text-align: center;

  box-shadow: 0 10px 30px rgba(0,0,0,0.25);

  transition:
    background-color 0.5s ease,
    transform 0.2s ease,
    box-shadow 0.3s ease;
}

/* Subtle hover energy */
#game:hover {
  box-shadow: 0 12px 35px rgba(0,0,0,0.3);
}

/* ============================= */
/* LEVEL INFO */
/* ============================= */

#levelDisplay {
  font-size: 1.6em;
  margin-bottom: 10px;
}

#rangeDisplay,
#guessesDisplay {
  font-weight: bold;
  margin-bottom: 5px;
}

/* ============================= */
/* INPUT */
/* ============================= */

input {
  padding: 8px;
  margin: 12px 5px;
  width: 130px;
  border-radius: 6px;
  border: 2px solid #333;
  text-align: center;
  font-size: 1em;
}

/* ============================= */
/* BUTTONS */
/* ============================= */

button {
  padding: 8px 14px;
  margin: 5px;
  cursor: pointer;
  background-color: #0d6efd;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;

  transition:
    background-color 0.3s ease,
    transform 0.1s ease,
    box-shadow 0.2s ease;
}

button:hover {
  background-color: #084298;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

button:active {
  transform: scale(0.95);
}

/* ============================= */
/* FEEDBACK */
/* ============================= */

#feedback {
  margin-top: 18px;
  font-size: 1.4em;
  font-weight: bold;
  transition: all 0.3s ease;
}

/* ============================= */
/* TEMPERATURE STYLES */
/* ============================= */

#game.very-hot {
  background-color: #ff1a1a;
  color: white;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.7);
}

#game.hot {
  background-color: #ff944d;
  box-shadow: 0 0 15px rgba(255, 140, 0, 0.6);
}

#game.warm {
  background-color: #ffd633;
}

#game.cold {
  background-color: #66ccff;
}

#game.ice-cold {
  background-color: #3399ff;
  color: white;
  box-shadow: 0 0 15px rgba(0, 100, 255, 0.6);
}

#game.correct {
  background-color: #66ff99;
  box-shadow: 0 0 20px rgba(0, 200, 0, 0.6);
}

/* ============================= */
/* FINAL VICTORY */
/* ============================= */

#game.victory {
  background-color: gold;
  color: black;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.9);
  animation: victoryFlash 0.8s ease;
}

@keyframes victoryFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ============================= */
/* LEVEL UP ANIMATION */
/* ============================= */

.level-up {
  animation: levelFlash 0.6s ease;
}

@keyframes levelFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

/* ============================= */
/* FOOTER */
/* ============================= */

footer {
  text-align: center;
  padding: 15px;
  background-color: #0d6efd;
  color: white;
  margin-top: 40px;
}