*{
    margin: 0;
    box-sizing: border-box;
}
body{
    font-family: Arial, Helvetica, sans-serif;
    background-color:#f0f2f5 ;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}
.main {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    width: 350px;
    text-align: center;
}
h2 {
    margin-bottom: 10px;
    color: #333;
}

h3 {
    margin-bottom: 20px;
    color: #555;
    font-weight: normal;
}
input[type="number"] {
    padding: 10px;
    width: 80%;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
    text-align: center;
}
button {
    padding: 10px 20px;
    margin: 10px 5px;
    border: none;
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}
#resultMessage {
    font-weight: bold;
    margin-top: 20px;
    min-height: 24px; 
}
#previousGuess {
    margin-top: 15px;
    color: #555;
}
#chances {
    font-weight: bold;
    margin-bottom: 10px;
}
.correct {
    color: green;
}

.too-low {
    color: #007bff; /* blue */
}

.too-high {
    color: red;
}

.game-over {
    color: darkred;
}
/* Shake animation */
@keyframes shake {
  0% { transform: translateX(0px); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0px); }
}

.shake {
  animation: shake 0.3s;
}
