* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  background-size: cover;
  background-repeat: no-repeat;
  user-select: none;
}

.calculator {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px 40px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  width: 380px;
  width: 90%;
  max-width: 380px;
}

input {
  width: 100%;
  padding: 25px 20px;
  font-size: 30px;
  color: #fff;
  background: transparent;
  border-radius: 15px;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
  text-align: right;
  margin-bottom: 25px;
  outline: none;
  font-size: clamp(20px, 5vw, 30px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

input::placeholder {
  color: #bbb;
  font-style: italic;
  opacity: 0.6;
}

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

button {
  border-radius: 10px;
  padding: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.2),
    inset 0 -3px 0 rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  margin: 2px;
  font-size: clamp(14px, 4vw, 16px);
}

button:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow:
    0 6px 10px rgba(0, 0, 0, 0.3),
    inset 0 -3px 0 rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

button:active {
  transform: scale(0.95);
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.5);
}

.operator {
  background: rgba(255, 255, 255, 0.25);
  color: #ffd369;
  box-shadow:
    0 4px 6px rgba(255, 215, 105, 0.5),
    inset 0 -3px 0 rgba(255, 255, 255, 0.4);
}

.operator:hover {
  background: rgba(255, 215, 105, 0.7);
  color: #2b2b2b;
  box-shadow:
    0 6px 10px rgba(255, 215, 105, 0.7),
    inset 0 -3px 0 rgba(255, 255, 255, 0.6);
}

.equalBtn {
  background: #ffd369;
  color: #2b2b2b;
  box-shadow: 0 4px 12px rgba(255, 215, 105, 0.8);
  font-weight: bold;
}

.equalBtn:hover {
  background: #ffec99;
  box-shadow: 0 6px 15px rgba(255, 215, 105, 1);
  transform: scale(1.05);
}

#mic {
  background: rgba(0, 255, 255, 0.3);
  color: #00fff7;
  font-size: 24px;
  box-shadow: 0 0 8px #00fff7;
  transition: all 0.3s ease;
}

#mic.listening {
  animation: pulse 1s infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 10px #00fff7;
  }

  50% {
    box-shadow: 0 0 25px #00fff7;
  }
}


#advancedPanel {
  max-height: 0;
  overflow: hidden;
  background: transparent;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 0;
  transition: max-height 0.4s ease-in-out, padding 0.3s;
  border-radius: 12px;
  margin-top: 10px;
  border: 1.01px solid rgba(255, 215, 105, 1);
}

#advancedPanel.show {
  max-height: 200px;
  padding: 15px;
}


#advancedPanel.show .adv-btn {
  animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.adv-btn {
  border-radius: 10px;
  padding: 12px 20px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.2),
    inset 0 -3px 0 rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  margin: 2px;
  font-size: clamp(14px, 4vw, 16px);
}

.adv-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow:
    0 6px 10px rgba(0, 0, 0, 0.3),
    inset 0 -3px 0 rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.adv-btn:active {
  transform: scale(0.95);
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.5);
}