@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
    font-family: 'Roboto', sans-serif;
    margin: 0;
}

#calculator {
    border-radius: 20px;
    box-shadow: 5px 5px 15px #323232;
    padding: 20px;
    background: white;
    width: 320px;
    height: 500px;
}

#screen {
    width: 90%;
    height: 80px;
    background-color: #252525;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0 15px;
    font-size: 2em;
    text-align: right;
    margin-bottom: 30px;
}

#calculator > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.button {
    width: 22%;
    height: 60px;
    border-radius: 10px;
    border: none;
    background-color: #f1f1f1;
    font-size: 1.5em;
    margin-bottom: 10px;
    box-shadow: 0 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, transform 0.2s;
}

.button[data-operator] {
    background-color: #ff7e5f;
    color: white;
}

#equal {
    background-color: #4caf50;
    color: white;
    width: 74%;
}

#reset, #delete {
    background-color: #d32f2f;
    color: white;
    width: 22%;
    
}

.button[data-number]:hover {
    background-color: #eaeaea;
}

.button[data-operator]:hover {
    background-color:  #e57155
}

#reset:hover, #delete:hover {
    background-color: #bd2a2a;
}

#equal:hover {
    background-color: #449d48;

}

.button:active {
    background-color: #ccc;
    transform: translateY(3px);
}

input::placeholder {
    font: 1.50rem/3 "Roboto";
}

.footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.footer > a, .footer > pre {
    color: white;
    text-decoration: none;
    transition: 1s;
    font-size: 20px;
    text-shadow: 1px 1px 2px #252525;
}

.footer > a:hover {
    border-bottom: 1px solid white;
    color: rgba(252, 252, 252, 0.849);
}

#screen {
    font-size: 2rem; /* Dimensione di base */
    transition: font-size 0.2s ease; /* Transizione fluida */
  }
  
  #screen.small-text {
    font-size: 1.5rem; /* Dimensione ridotta */
  }
  
  #screen.smaller-text {
    font-size: 1.2rem; /* Dimensione ancora più ridotta */
  }
  
  #screen.smallest-text {
    font-size: 1rem; /* Dimensione minima */
  }