/* General Styling */
body {
  margin: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: background 0.4s, color 0.4s;
    background: linear-gradient(-45deg, #7b2ff7, #00c6ff, #ff6ec4, #7873f5);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}


@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}




/* Theme Toggle Button */
.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  padding: 10px 15px;
  border-radius: 50%;
  backdrop-filter: blur(5px);
  transition: transform 0.3s;
}
.theme-toggle:hover {
  transform: scale(1.1);
}

/* Dark Theme */
body.dark {
  background: linear-gradient(135deg, #1d2671, #c33764);
  color: #fff;
}

/* Light Theme */
body.light {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  color: #000;
}

.calculator {
  background: #1c1c1c;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  width: 320px;
  transition: background 0.4s;
}

body.light .calculator {
  background: #fff;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.display {
  width: 100%;
  height: 60px;
  background: #000;
  color: #0ff;
  font-size: 2rem;
  text-align: right;
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 15px;
  overflow-x: auto;
  transition: background 0.4s, color 0.4s;
}

body.light .display {
  background: #f1f3f5;
  color: #333;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

button {
  padding: 18px;
  border: 2px solid #0ff;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: bold;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

button:hover {
  background: rgba(0, 255, 255, 0.2);
  transform: scale(1.05);
}

button:active {
  transform: scale(0.95);
  background: rgba(0, 255, 255, 0.4);
}

.equal {
  grid-column: span 2;
  background: #0ff;
  color: #000;
  border: 2px solid #fff;
}

.equal:hover {
  background: #fff;
  color: #000;
}

body.light button {
  border: 2px solid #0077ff;
  color: #000;
}
body.light button:hover {
  background: rgba(0, 119, 255, 0.2);
}

/* Responsive */
@media (max-width: 400px) {
  .calculator {
    width: 95%;
  }
  button {
    font-size: 1rem;
    padding: 15px;
  }
}
 /* General Styling */
    body {
      margin: 0;
      height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #1d2671, #c33764);
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    .calculator {
      background: #1c1c1c;
      padding: 20px;
      border-radius: 20px;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
      width: 320px;
    }

    .display {
      width: 100%;
      height: 60px;
      background: #000;
      color: #0ff;
      font-size: 2rem;
      text-align: right;
      padding: 10px;
      border-radius: 12px;
      margin-bottom: 15px;
      overflow-x: auto;
    }

    .buttons {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
    }

    button {
      padding: 18px;
      border: 2px solid #0ff;
      border-radius: 12px;
      font-size: 1.2rem;
      font-weight: bold;
      background: transparent;
      color: #fff;
      cursor: pointer;
      transition: all 0.2s ease-in-out;
    }

    button:hover {
      background: rgba(0, 255, 255, 0.2);
      transform: scale(1.05);
    }

    button:active {
      transform: scale(0.95);
      background: rgba(0, 255, 255, 0.4);
    }

    .equal {
      grid-column: span 2;
      background: #0ff;
      color: #000;
      border: 2px solid #fff;
    }

    .equal:hover {
      background: #fff;
      color: #000;
    }

    /* Responsive */
    @media (max-width: 400px) {
      .calculator {
        width: 95%;
      }
      button {
        font-size: 1rem;
        padding: 15px;
      }
    }

    /* Mic button styling */
#micBtn {
  padding: 10px 20px;
  font-size: 18px;
  border-radius: 10px;
  border: none;
  background: #222;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Glow effect when active */
#micBtn.active {
  background: #ff0055;
  box-shadow: 0 0 15px #ff0055, 0 0 30px #ff0055;
  animation: pulse 1s infinite;
}

/* Pulse animation */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
