  /* Modal Overlay */
  .modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 999;
    justify-content: center;
    align-items: center;
  }

  /* Modal Box */
  .modal-box {
    background: #f7f7f7;
    border-radius: 12px;
    width: 320px;
    max-width: 90%;
    padding: 20px;
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px);}
    to { opacity: 1; transform: translateY(0);}
  }

  /* Close Button */
  .modal-close {
    position: absolute;
    top: 12px; right: 12px;
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
  }

  /* Calculator Screen */
  .calculator-screen {
    width: 100%;
    height: 50px;
    font-size: 24px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    text-align: right;
    margin-bottom: 12px;
    box-sizing: border-box;
  }

  /* Calculator Buttons Container */
  .calculator-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  /* Button Styles */
  .calculator-keys button {
    padding: 15px 0;
    font-size: 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
  }

  .calculator-keys button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  }

  /* Number buttons */
  .btn-number {
    background: #e0e0e0;
  }

  /* Operator buttons */
  .btn-operator {
    background: #f4a261;
    color: white;
  }

  /* Action buttons */
  .btn-action {
    background: #e76f51;
    color: white;
  }

  /* Equals button */
  .btn-equal {
    background: #2a9d8f;
    color: white;
    grid-column: span 1;
  }

