:root {
  --bg1: #0b1220;
  --bg2: #123033;
  --bg3: #1a1330;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background:
    radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.12), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.14), transparent 45%),
    linear-gradient(135deg, var(--bg1) 0%, var(--bg3) 100%);
  background-attachment: fixed;
  color: #e2e8f0;
  -webkit-tap-highlight-color: transparent;
}

#root { min-height: 100vh; }

/* Persian numerals + tabular feel on the display */
.display-screen .break-all {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.calc-btn {
  cursor: pointer;
  border: none;
  outline: none;
  box-shadow: 0 2px 0 rgba(0,0,0,0.25);
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}
.calc-btn:active {
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

.calc-body {
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.display-screen {
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.6);
}

/* History drawer slide (mobile) */
.history-drawer {
  transform: translateX(-105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.history-drawer.open {
  transform: translateX(0);
}
@media (min-width: 768px) {
  .history-drawer {
    transform: none !important;
    transition: none;
  }
}

.toast {
  left: 50%;
  transform: translateX(-50%);
  animation: toastIn 0.25s ease-out;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* scrollbar */
.history-drawer ::-webkit-scrollbar { width: 6px; }
.history-drawer ::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 3px;
}