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

:root {
  --font-fam: "League Spartan", sans-serif;
  --font-w-1: 600;
  --font-w-2: 700;
  --font-w-3: 800;
  --font-w-4: 900; }

html {
  font-size: 62.5%; }

body {
  font-size: 3.2rem;
  font-family: var(--font-fam);
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; }

.container--main {
  display: flex;
  flex-direction: column;
  gap: 2rem; }
  .container--main .container--top {
    display: flex;
    justify-content: space-between; }
  .container--main .calc-screen {
    height: 10rem; }
  .container--main .container--keypad {
    display: grid;
    grid-template-rows: repeat(5, 6rem);
    gap: 2rem; }

.container--top .theme-selector {
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative; }
  .container--top .theme-selector span {
    font-size: 1.6rem; }
  .container--top .theme-selector ol {
    position: absolute;
    top: -20px;
    right: 8px;
    list-style: none;
    display: flex;
    gap: 1.2rem;
    justify-content: flex-end;
    width: 100%;
    font-size: 1.6rem; }

.slider input[type="range"] {
  padding: 1.2rem 0.8rem;
  height: 1.8rem;
  width: 6rem;
  border-radius: 2em;
  cursor: pointer; }

.calc-screen {
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 2rem; }
  .calc-screen .digits {
    color: var(--theme-text--1);
    letter-spacing: 0.2rem; }

@keyframes blinkAnimate {
  0% {
    opacity: 0; }
  25% {
    opacity: 0.25; }
  50% {
    opacity: 0.5; }
  75% {
    opacity: 0.25; }
  100% {
    opacity: 0; } }

.container--keypad {
  padding: 2rem;
  border-radius: 1rem; }
  .container--keypad button {
    cursor: pointer;
    font-weight: var(--font-w-2); }
  .container--keypad .btn {
    border: none;
    border-radius: 1rem; }
  .container--keypad .kres,
  .container--keypad .keq {
    grid-column: span 2; }

.attribution {
  font-size: 11px;
  text-align: center; }

.attribution a {
  color: #3e52a3; }

.theme--1 {
  --theme-back--1: hsl(
    222,
    26%,
    31%
  );
  --theme-back--2: hsl(
    223,
    31%,
    20%
  );
  --theme-back--3: hsl(
    224,
    36%,
    15%
  );
  --theme-key--1: hsl(225, 21%, 49%);
  --theme-key--2: hsl(224, 28%, 35%);
  --theme-key--3: hsl(6, 63%, 50%);
  --theme-key--4: hsl(6, 70%, 34%);
  --theme-key--5: hsl(30, 25%, 89%);
  --theme-key--6: hsl(28, 16%, 65%);
  --theme-text--2: hsl(221, 14%, 31%);
  --theme-text--1: hsl(0, 0%, 100%);
  --theme-text--3: hsl(198, 20%, 13%); }

.theme--2 {
  --theme-back--1: hsl(0, 0%, 90%);
  --theme-back--2: hsl(
    0,
    5%,
    81%
  );
  --theme-back--3: hsl(0, 0%, 93%);
  --theme-key--1: hsl(185, 42%, 37%);
  --theme-key--2: hsl(185, 58%, 25%);
  --theme-key--3: hsl(25, 98%, 40%);
  --theme-key--4: hsl(25, 99%, 27%);
  --theme-key--5: hsl(45, 7%, 89%);
  --theme-key--6: hsl(35, 11%, 61%);
  --theme-text--1: hsl(60, 10%, 19%);
  --theme-text--2: hsl(0, 0%, 100%);
  --theme-text--3: hsl(198, 20%, 13%); }

.theme--3 {
  --theme-back--1: hsl(268, 75%, 9%);
  --theme-back--2: hsl(
    268,
    71%,
    12%
  );
  --theme-key--1: hsl(281, 89%, 26%);
  --theme-key--2: hsl(285, 91%, 52%);
  --theme-key--3: hsl(176, 100%, 44%);
  --theme-key--4: hsl(177, 92%, 70%);
  --theme-key--5: hsl(268, 47%, 21%);
  --theme-key--6: hsl(290, 70%, 36%);
  --theme-text--1: hsl(52, 100%, 62%);
  --theme-text--2: hsl(198, 20%, 13%);
  --theme-text--3: hsl(0, 0%, 100%); }

body {
  background: var(--theme-back--1); }

.calc-screen {
  background: var(--theme-back--2); }
  .calc-screen p {
    color: var(--theme-text--2); }

.container--keypad {
  background: var(--theme-back--2); }

#no,
#theme,
#calc {
  color: var(--theme-text--1); }

.slider input[type="range"] {
  accent-color: var(--theme-key--3);
  appearance: none;
  background: var(--theme-back--2); }

.btn {
  color: var(--theme-text--1);
  background: var(--theme-key--5);
  box-shadow: 0 0.5rem var(--theme-key--6); }
  .btn:hover {
    filter: brightness(115%); }

.btn.kdel,
.btn.kres {
  background: var(--theme-key--1);
  box-shadow: 0 0.5rem var(--theme-key--2);
  color: white; }

.btn.keq {
  background: var(--theme-key--3);
  box-shadow: 0 0.5rem var(--theme-key--4);
  color: var(--theme-text--2); }

@media (max-width: 24em) {
  .container--main .container--keypad {
    grid-template-columns: repeat(4, 6rem); }
    .container--main .container--keypad button {
      font-size: 2.2rem; } }

@media (min-width: 24em) {
  .container--main .container--keypad {
    grid-template-columns: repeat(4, 12rem); }
    .container--main .container--keypad button {
      font-size: 3.2rem; } }
