@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

/* ==========================
   RESET
========================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;

  box-sizing: border-box;
}

button,
input,
textarea {
  font: inherit;
}

button {
  background: none;
  border: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* ==========================
   HTML
========================== */

html {
  width: 100%;
  height: 100%;

  font-size: 16px;

  scroll-behavior: smooth;

  overflow: hidden;
}

/* ==========================
   BODY
========================== */

body {
  width: 100%;

  min-height: 100dvh;

  font-family: "Inter", sans-serif;

  color: var(--text-primary);

  display: flex;

  justify-content: center;
  align-items: center;

  overflow: hidden;

  background:
    radial-gradient(
      circle at top left,
      rgba(124, 92, 255, 0.18),
      transparent 30%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(79, 209, 197, 0.15),
      transparent 35%
    ),
    var(--bg-primary);

  transition:
    background .35s ease,
    color .35s ease;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  text-rendering: optimizeLegibility;
}

/* ==========================
   LIGHT THEME BACKGROUND
========================== */

body[data-theme="light"] {

  background:
    radial-gradient(
      circle at top left,
      rgba(109, 93, 252, 0.12),
      transparent 30%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(20, 184, 166, 0.10),
      transparent 35%
    ),
    var(--bg-primary);

}

/* ==========================
   GLOBAL TRANSITIONS
========================== */

body,
.calculator,
.side-drawer,
.keypad button,
.drawer-item,
.history-item,
.menu-btn,
.theme-btn,
.history-btn {

  transition:
    background .25s ease,
    border-color .25s ease,
    color .25s ease,
    box-shadow .25s ease,
    transform .25s ease;

}

/* ==========================
   FOCUS STATES
========================== */

button:focus-visible {

  outline: 2px solid var(--primary);

  outline-offset: 2px;

}

/* ==========================
   SELECTION
========================== */

::selection {
  background: var(--primary);
  color: white;
}

/* ==========================
   SCROLLBAR
========================== */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.15);

  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.25);
}

/* ==========================
   LIGHT SCROLLBAR
========================== */

body[data-theme="light"] ::-webkit-scrollbar-thumb {

  background: rgba(15,23,42,.15);

}

body[data-theme="light"] ::-webkit-scrollbar-thumb:hover {

  background: rgba(15,23,42,.25);

}