@import url('https://fonts.googleapis.com/css2?family=Kanit&family=Maven+Pro&display=swap');
       
body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    min-width: 100vw;
    margin:0;  background: 
    linear-gradient(145deg, #e1e1e1, #ffffff);
    /*background: url(../images/mathematical-formulas.jpg) no-repeat;
    background-size: 200% 100%;
    /*animation: mirrorBackground 20s linear infinite alternate;
    position: relative;*/
}

.total {
  min-height: 100vh;
  min-width: 100vw;
  display: grid;
  margin:auto;
  grid-template-areas: 'header' 'main' 'main' 'footer';
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.topnav {
  grid-area: header;
  width: 90%;
  overflow: hidden;
  margin-top: 20px;
  height: 40px;
  margin-left: 50%;
  transform: translateX(-50%);
  border-radius: 35px;
  color: #ffffff;
  font-size: 10px;
  text-align: center;
  border-radius: 33px;
  background: linear-gradient(145deg, #006fe6, #0084ff);
  box-shadow:  2px 2px 5px #0074f0,
               -2px -2px 5px #0082ff;
  font-family: 'Poppins', sans-serif;
  line-height: 15px;  /* Aggiungi questa riga */
}

.logonav {
  float: left;
  background-color: rgba(54, 115, 19, 0);
  background-size: contain;
  background-image: url(../images/LogoW.svg);
  display: flex;
  height: 40px;
  width: 40px;
  margin-left: 20px;
  background-repeat: no-repeat;
  text-decoration: none;
  position: fixed;
}

.container {
  grid-area: main;
  text-align: center;
  max-width: 400px;
  padding: 20px;
  height: min-content;
  margin: 0 auto;
  border-radius: 50px;
  line-height: 16px;
  font-size: 14px;
  background: linear-gradient(145deg, #e1e1e1, #ffffff);
  box-shadow:  35px 35px 70px #d5d5d5,
              -35px -35px 70px #ffffff;
}
.button-grid {
  grid-area: main;
  height:250px;
  margin: 0 auto;
  margin-top: 345px;
  display: grid;
  grid-template-columns: repeat(3, 80px);
  gap: 8px;
  max-width: fit-content;
  padding: 40px;
  border-radius: 50px;
  background: linear-gradient(145deg, #e1e1e1, #ffffff);
  box-shadow:  35px 35px 70px #d5d5d5,
              -35px -35px 70px #ffffff;
}
.number-button {
  padding: 5px;
  font-size: 16px;
  border-radius: 75px;
  background: #007bff;
  box-shadow:  3px 3px 6px #0064cf,
            -3px -3px 6px #0092ff;
  border: none;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.button:active,
.button:focus {
  outline: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}
.footer {
  grid-area: footer;
  position: fixed;
  margin-top: 0;
  bottom: 0;
  width: 100%;
  font-size: 10px;
  text-align: center;
  color: #007bff;
  border-top: 1px solid #007bffe8;
  border-radius: 0px;
  background: #f9f9f9;

}

@keyframes mirrorBackground {
  to {
    background-position: 100% 0;
  }
}

.container h1 {
  color: #007bff;
}
.container p{
  font-size: smaller;
  font-weight: 500;
}
a{
    color: #007bff;
}
input[type="text"] {
  border: 1px solid #007bff;
  font-family: 'Poppins', sans-serif;
  color: #007bff;
  border-radius: 35px;
  background: #fafafa;
  box-shadow: inset 3px 3px 6px #d5d5d5,
              inset -3px -3px 6px #ffffff;
  margin: 20px;
  padding: 5px;
  font-size: 16px;
  
}

#score {
  font-size: 22px;
  color: #007bff;
  transition: font-size 0.5s ease, color 0.5s ease; 
}
.scoreIncreased {
  color: #00cc00; /* Colore verde */
}
#highscore{
  color: #00cc00;
  font-size: medium;
}
input[type=text]:focus {
  border:none;
}

button {
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 35px;
  background-color: #007bff;
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
    border-radius: 75px;
  background: #007bff;
  box-shadow:  3px 3px 6px #0064cf,
              -3px -3px 6px #0092ff;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent
}

button:hover {
  background-color: #0064cf;
}

#hint-paragraph {
  color: #007bff;
  font-size: 16px;
  font-style: italic;
  animation-name: fadeIn;
  animation-duration: 0.8s
}
/*MODAL*/
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
  -webkit-animation-name: fadeIn; /* Fade in the background */
  -webkit-animation-duration: 0.4s;
  animation-name: fadeIn;
  animation-duration: 0.4s;
  top: 50%;
  transform: translateY(-50%)
}

/* Modal Content */
.modal-content {
  position: relative;
  margin: 40% auto;
  transform:translateY(-50%);
  background-color: #fefefe;
  width: 400px;
  border-radius: 10px;
  -webkit-animation-name: slideIn;
  -webkit-animation-duration: 0.4s;
  animation-name: slideIn;
  animation-duration: 0.4s
}

/* The Close Button */
.close {
  color: white;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.modal-header {
  padding: 2px 6px;
  background-color: #007bff;
  color: white;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.modal-body {
  padding: 2px 16px;
}
.modal-body p{

  word-wrap: break-word; 
}
.modal-footer {
  padding: 2px 16px;
  background-color: #007bff;
  color: white;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* Add Animation */
@-webkit-keyframes slideIn {
  from {bottom: -300px; opacity: 0} 
  to {bottom: 0; opacity: 1}
}

@keyframes slideIn {
  from {bottom: -300px; opacity: 0}
  to {bottom: 0; opacity: 1}
}

@-webkit-keyframes fadeIn {
  from {opacity: 0} 
  to {opacity: 1}
}

@keyframes fadeIn {
  from {opacity: 0} 
  to {opacity: 1}
}