
    body {
      margin: 0;
      padding: 0;
      font-family: Arial, sans-serif;
      background-color: #ccc; /* Gray background */
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    .calculator {
      width: 320px;
      border-radius: 20px;
      background-color: white;
      box-shadow: 0 0 20px rgba(0, 0, 255, 0.2);
      overflow: hidden;
      padding: 10px;
      transition: background 0.3s, color 0.3s;
    }

    .header {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
    }

    .icon-btn {
      background: transparent;
      border: none;
      font-size: 1.2rem;
      cursor: pointer;
    }

    .history-panel {
      display: none;
      background: #f0f0f0;
      max-height: 100px;
      overflow-x: auto;
      white-space: nowrap;
      padding: 10px;
      font-size: 0.9rem;
      border: 1px solid #ccc;
      margin-bottom: 10px;
    }

    .display {
      background-color: #e0e0e0;
      text-align: right;
      padding: 20px;
      font-size: 2rem;
      border-radius: 8px;
      margin-bottom: 10px;
    }

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

    button {
      padding: 20px;
      font-size: 1.2rem;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.2s;
      background-color: #e6f0ff; /* light blue */
    }

    button:hover {
      background-color: #d6e6ff;
    }

    .clear, .operator, .equal {
      background-color: #99c2ff;
    }

    .dark-mode .calculator {
      background-color: #1f1f1f;
      color: white;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    }

    .dark-mode .display,
    .dark-mode .history-panel,
    .dark-mode button {
      background-color: #333;
      color: white;
    }

    .dark-mode .clear,
    .dark-mode .operator,
    .dark-mode .equal {
      background-color: #555;
    }
  