* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-color: #f2f2f2;
  --text-color: #000;
  --btn-shadow: #ccc;
  --accent-color: #ff9500;

  --font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body.dark {
  --bg-color: #1e1e1e;
  --bg-result: #262525;
  --text-color: #fff;
  --btn-bg: #2e2e2e;
  --btn-shadow: #444;
}

body {
  background-color: var(--bg-color);
  font-family: var(--font-family);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: hidden;
  padding: 10px 10px;
}

.result {
  position: relative;
  background: var(--bg-result);
  height: calc(100dvh - 20px);
  max-width: 425px;
  width: 100%;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.theme {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-color);
  color: white;
  cursor: pointer;
}

.history-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 0 0.75rem;
}

.history {
  font-size: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: end;
  gap: 1.5rem;
  text-align: end;
  color: #a3a0a0;
}

.current-result {
  color: var(--text-color);
  text-align: end;
  border-top: 1px solid #a3a0a032;
  border-bottom: 1px solid #a3a0a032;
}

.current-result .current-question {
  font-size: 1.7rem;
}
.current-result .current-answer {
  font-size: 3rem;
  font-weight: 500;
}

.buttons {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding-bottom: 10px;
}

button {
  font-size: 1rem;
  width: 55px;
  height: 55px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

button:hover {
  background-color: #e9e7e7;
}

button:active {
  background-color: var(--accent-color);
  color: white;
}

button.accent {
  color: var(--accent-color);
  font-weight: 700;
}

button.accent:active {
  background-color: var(--accent-color);
  color: white;
}
button.equals {
  background-color: var(--accent-color);
  color: white;
  font-weight: 700;
  transition: opacity 300ms;
}

button.equals:hover {
  opacity: 0.8;
}

.hidden {
  display: none;
}
