* {
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
}

body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

.calculator {
  width: 340px;
  padding: 20px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(25px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
}

.calculator:hover {
  transform: scale(1.02);
}

.display {
  background: rgba(0,0,0,0.35);
  color: #fff;
  border-radius: 22px;
  padding: 16px 18px;
  font-size: 2.2rem;
  text-align: right;
  margin-bottom: 18px;
  overflow-x: auto;
  box-shadow: inset 0 0 10px rgba(255,255,255,0.1);
}

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

button {
  border: none;
  border-radius: 999px;
  padding: 16px 0;
  font-size: 1.1rem;
  color: #fff;
  background: rgba(255,255,255,0.12);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

button:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-2px);
}

button:active {
  transform: scale(0.95);
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.operator {
  background: linear-gradient(135deg, #ff8a00, #ffb347);
  box-shadow: 0 6px 14px rgba(255,140,0,0.4);
}

.equal {
  background: linear-gradient(135deg, #00c853, #64dd17);
  box-shadow: 0 6px 14px rgba(0,200,83,0.4);
}

.toggle {
  grid-column: span 2;
  background: linear-gradient(135deg, #2979ff, #00b0ff);
  box-shadow: 0 6px 14px rgba(41,121,255,0.4);
}

.scientific {
  display: none;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #9c27b0, #e040fb);
  box-shadow: 0 6px 12px rgba(156,39,176,0.3);
}

/* mobile */
/* @media (max-width: 200px) {
  .calculator {
    width: 95%;
    padding: 18px;
  }
  .display {
    font-size: 1.9rem;
    padding: 14px 16px;
  }
  button {
    padding: 14px 0;
    font-size: 1rem;
  }
} */

/* smooth scroll for display overflow */
.display::-webkit-scrollbar {
  height: 6px;
}

.display::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 10px;
}

.display::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
}
.container {
  display: flex;
  align-items: center;
  gap: 20px; /* space between logo and calculator */
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #2d7ff9;
  font-size: 1.8rem;
  font-weight: bold;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.logo img {
  width: 100px;
  height: 100px;
  margin-bottom: 8px;
}

/* mobile adjustment */
@media (max-width: 480px) {
  .container {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .logo {
    font-size: 1.5rem;
  }
  .logo img {
    width: 50px;
    height: 50px;
  }
}
