* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
  }
  
  header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 20px;
    position: relative;
  }
  
  .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }
  
  header h1 a {
    text-decoration: none;
    color: #333;
    font-size: 24px;
    font-weight: 500;
    transition: color 0.3s;
  }
  
  header h1 a:hover {
    color: #007BFF;
  }
  .hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 5px;
    z-index: 100;
  }
  
  .main-nav {
    display: flex;
    transition: all 0.3s ease-in-out;
  }
  
  .main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
  }
  
  .main-nav ul li a {
    text-decoration: none;
    color: #007BFF;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
  }
  
  .main-nav ul li a:hover,
  .main-nav ul li a.active {
    color: #0056b3;
    background-color: #f0f4ff;
  }
  .calculator-section {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
  }
  
  .calculator {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
  }
  
  .calculator h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
  }
  
  #display {
    width: 100%;
    font-size: 24px;
    padding: 15px;
    text-align: right;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
  }
  
  #display:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
  }
  
  .buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  
  .btn {
    font-size: 20px;
    padding: 15px;
    background: #e9ecef;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .btn:hover {
    background: #ced4da;
    transform: translateY(-1px);
  }
  
  .operator {
    background: #6c757d;
    color: white;
  }
  
  .operator:hover {
    background: #495057;
  }
  
  .equal {
    background: #28a745;
    color: white;
  }
  
  .equal:hover {
    background: #218838;
  }
  
  .clear {
    background: #dc3545;
    color: white;
  }
  
  .clear:hover {
    background: #c82333;
  }
  
  .backspace {
    background: #343a40;
    color: white;
  }
  
  .backspace:hover {
    background: #212529;
  }
  .history {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
  }
  
  .history h2 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 15px;
  }
  
  .history ul {
    list-style-type: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
  }
  
  .history li {
    background: #f8f9fa;
    padding: 10px;
    margin: 8px 0;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
  
  footer {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 40px;
    font-size: 14px;
    color: #333;
  }
  
  .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    text-align: left;
    gap: 30px;
  }
  
  .footer-section {
    flex: 1;
    min-width: 200px;
  }
  
  .footer-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
  }
  
  .footer-section ul {
    list-style-type: none;
    padding: 0;
  }
  
  .footer-section ul li {
    margin-bottom: 10px;
  }
  
  .footer-section ul li a {
    text-decoration: none;
    color: #007BFF;
    font-weight: 500;
    transition: color 0.3s;
  }
  
  .footer-section ul li a:hover {
    color: #0056b3;
  }
  
  .footer-socials {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
  }
  
  .footer-socials a {
    text-decoration: none;
    color: #333;
    font-size: 20px;
    transition: color 0.3s;
  }
  
  .footer-socials a:hover {
    color: #007BFF;
  }
  
  .footer-bottom {
    margin-top: 30px;
    font-size: 12px;
    color: #777;
  }
  
  @media (max-width: 768px) {
    .hamburger {
      display: block;
    }
  
    .main-nav {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: #fff;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease-in-out;
    }
  
    .main-nav.active {
      max-height: 500px;
    }
  
    .main-nav ul {
      flex-direction: column;
      gap: 0;
      padding: 10px 20px;
      width: 100%;
    }
  
    .main-nav ul li {
      margin: 5px 0;
    }
  
    .main-nav ul li a {
      display: block;
      padding: 12px 15px;
    }
  
    .calculator {
      padding: 15px;
      margin: 10px;
    }
  
    .buttons {
      gap: 6px;
    }
  
    .btn {
      padding: 12px;
      font-size: 18px;
    }
  
    #display {
      font-size: 20px;
      padding: 12px;
    }
  
    .history h2 {
      font-size: 16px;
    }
  
    .footer-container {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }
  
    .footer-section {
      text-align: center;
    }
  
    .footer-socials {
      justify-content: center;
    }
  }
  
  @media (max-width: 480px) {
    .btn {
      padding: 10px;
      font-size: 16px;
    }
  
    .calculator h2 {
      font-size: 20px;
    }
  
    #display {
      font-size: 18px;
    }
  
    .history li {
      font-size: 13px;
      padding: 8px;
    }
  }