* {
    box-sizing: border-box;
  }

  body {
    background-color: #202020;
    color: #ffffff;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 90px;
    margin: 0;
  }

  h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
  }

  #display {
    font-size: 2em;
    width: 100%;
    max-width: 400px;
    text-align: right;
    margin-bottom: 10px;
    padding: 15px;
    background: #2d2d2d;
    border: none;
    color: white;
  }

  .toggle {
    margin-bottom: 15px;
    font-size: 1.2em;
  }

  .buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 400px;
  }

  button {
    font-size: 1.8em;
    background-color: #2d2d2d;
    color: white;
    border: none;
    border-radius: 8px;
    aspect-ratio: 1 / 1;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  button:hover {
    background-color: #3a3a3a;
  }

  button.equals {
    background-color: #00aaff;
    color: black;
    font-weight: bold;
  }

  #message {
    margin-top: 15px;
    font-size: 1.2em;
    color: #4caf50;
    text-align: center;
  }

  #mathPrompt {
    margin-top: 20px;
    display: none;
    text-align: center;
  }

  #mathPrompt input {
    font-size: 1.5em;
    padding: 10px;
    width: 70%;
    max-width: 200px;
    margin-bottom: 10px;
  }

  #mathAnswer {
    font-size: 2em;
    padding: 12px 20px;
    width: 80%;
    max-width: 300px;
    border: 2px solid #00aaff;
    border-radius: 8px;
    background-color: #2d2d2d;
    color: white;
    text-align: center;
    outline: none;
    transition: border-color 0.2s ease;
    margin-top: 10px;
  }
  
  #mathAnswer:focus {
    border-color: #4caf50;
  }  

  #feedback {
    color: red;
    font-size: 1em;
  }

  #newQuestionBtn {
    margin-top: 15px;
    padding: 12px 24px;
    font-size: 1.2em;
    background-color: #00aaff;
    color: #202020;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease, transform 0.1s ease;
    max-width: 250px;
    max-height: 50px;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
  
  #newQuestionBtn:hover {
    background-color: #0094d9;
  }
  
  #newQuestionBtn:active {
    transform: scale(0.98);
  }  

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

    button {
      font-size: 2em;
    }

    #display {
      font-size: 2.5em;
      height: 60px;
    }
}
