body, html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.calculator {
    width: auto;
    max-width: 500px;
    border: 1px solid #888;
    border-radius: 10px;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.container{
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;

}

.container2 {
  max-width: 600px;
  width: 90%; /* Adjust width for padding and to prevent overflow */
  margin: 20px auto; /* Center the container */
  padding: 20px;
}

.calculator-screen {
    width: 100%;
    height: 50px;
    border: none;
    background-color: #f0f0f0;
    margin-bottom: 20px;
    padding: 10px;
    font-size: 22px;
    border-radius: 5px;
    color: #333;
}

.calculator-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

button {
    height: 50px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #f0f0f0;
}

.operator, .equal-sign {
    background-color: #4CAF50;
    color: white;
}

.operator:hover, .equal-sign:hover {
    background-color: #45a049;
}

.all-clear {
    background-color: #f44336;
    color: white;
    grid-column: span 2;
}

.all-clear:hover {
    background-color: #d32f2f;
}

@media (max-width: 500px) {
    .calculator {
        width: 90%;
    }
    button {
        font-size: 16px;
    }
    .calculator-screen {
        font-size: 20px;
    }
}

.calculator-operation {
    text-align: right;
    color: #888;
    margin-bottom: 5px;
    height: 20px; /* Adjust height as needed */
}


.nav {
    width: 100%;
    background-color: #1A237E;
    display: flex;
    align-items: center;
  }
  .nav > .nav-header {
    flex: 0.95;
    padding-left: 1rem;
  }
  .nav > .nav-header > .nav-title {
    font-size: 22px;
    color: #fff;
  }
  .nav > .nav-list {
    display: flex;
    gap: 2rem;
  }
  .nav > .nav-list > li {
    list-style-type: none;
  }
  .nav > .nav-list > li a {
    text-decoration: none;
    color: #efefef;
    cursor: pointer;
  }
  .nav > #nav-check {
      display: none;
  }
  @media (max-width: 480px) {
    .nav {
      padding: 1rem;
    }
    .nav > .nav-btn {
      display: inline-block;
      position: absolute;
      right: 0;
      top: 0;
      padding-top: 0.2rem;
    }
    .nav > .nav-btn > label {
      display: inline-block;
      width: 50px;
      height: 50px;
      padding: 13px;
    }
    .nav > .nav-btn > label > span {
      display: block;
      width: 25px;
      height: 10px;
      border-top: 2px solid #eee;
    }
    .nav > .nav-list {
      position: absolute;
      display: flex;
      flex-direction: column;
      gap: 1rem;
      width: 100%;
      background-color: #1A237E;
      height: 0;
      transition: all 0.3s ease-in;
      top: 40px;
      left: 0;
      overflow: hidden;
      z-index: 99;
    }
    .nav > .nav-list > li {
      width: 100%;
      margin-top: 1.5rem;
    }
    .nav > #nav-check:checked ~ .nav-list {
      height: calc(100vh - 50px);
    }
  }


  footer {
    background-color: #1A237E;
    color: #ffffff;
    text-align: center;
    padding: 10px;
    width: 100%;
    height: 60px; /* Set a fixed height for the footer */
    position: relative; /* Change this to 'fixed' if you always want the footer at the bottom */
    bottom: 0;
    clear: both;
}

.card {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  padding: 20px;
  margin-top: 20px;
  border-radius: 4px;
}