@import url("https://fonts.googleapis.com/css2?family=League+Spartan:wght@100..900&display=swap");
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
:root {
  font-family: "League Spartan", sans-serif;
  font-weight: 700;
  --font-size-number: 32px;

  /****** THEME 1 ******/

  /* Backgrounds */
  --theme-1-main-bg: hsl(222, 26%, 31%); /*(main background)*/
  --theme-1-tb-kpbg: hsl(
    223,
    31%,
    20%
  ); /*(toggle background, keypad background)*/
  --theme-1-screen: hsl(224, 36%, 15%); /*(screen background)*/

  /* Keys */
  --theme-1-kbg-reset: hsl(225, 21%, 49%); /*(key background)*/
  --theme-1-ksh-reset: hsl(224, 28%, 35%); /* (key shadow)*/

  --theme-1-kbg-tb-equals: hsl(6, 63%, 50%); /* (key background, toggle)*/
  --theme-1-ksh-equals: hsl(6, 70%, 34%); /* (key shadow)*/

  --theme-1-kbg-main: hsl(30, 25%, 89%); /* (key background)*/
  --theme-1-ksh-main: hsl(28, 16%, 65%); /* (key shadow)*/

  /* Text */
  --theme-1-text: hsl(221, 14%, 31%);
  --theme-1-equals-text: hsl(0, 0%, 100%);
  --reset-del-text: hsl(0, 0%, 100%);
  --theme-1-text-main: hsl(0, 0%, 100%);

  /****** THEME 2 ******/

  /* Backgrounds */
  --theme-2-main-bg: hsl(0, 0%, 90%); /* (main background)*/
  --theme-2-tb-kpbg: hsl(0, 5%, 81%); /*(toggle background, keypad background)*/
  --theme-2-screen: hsl(0, 0%, 93%); /* (screen background)*/

  /* Keys */
  --theme-2-kbg-reset: hsl(185, 42%, 37%); /*(key background)*/
  --theme-2-ksh-reset: hsl(185, 58%, 25%); /* (key shadow)*/

  --theme-2-kbg-tb-equals: hsl(25, 98%, 40%); /* (key background, toggle)*/
  --theme-2-ksh-equals: hsl(25, 99%, 27%); /* (key shadow)*/

  --theme-2-kbg-main: hsl(45, 7%, 89%); /* (key background)*/
  --theme-2-ksh-main: hsl(35, 11%, 61%); /* (key shadow)*/

  /* Text */
  --theme-2-text: hsl(60, 10%, 19%);
  --theme-2-text-main: hsl(60, 10%, 19%);
  /****** THEME 3 ******/

  /* Backgrounds */
  --theme-3-main-bg: hsl(268, 75%, 9%); /* (main background)*/
  --theme-3-tb-kpbg: hsl(
    268,
    71%,
    12%
  ); /*(toggle background, keypad background, screen background)*/
  --theme-3-screen: hsl(268, 71%, 12%); /*;(screen background) */

  /* Keys */
  --theme-3-kbg-reset: hsl(281, 89%, 26%); /*Key background*/
  --theme-3-ksh-reset: hsl(285, 91%, 52%); /*Key shadow*/

  --theme-3-kbg-tb-equals: hsl(176, 100%, 44%); /*Key background, toggle*/
  --theme-3-ksh-equals: hsl(177, 92%, 70%); /*Key shadow*/

  --theme-3-kbg-main: hsl(268, 47%, 21%); /*Key background*/
  --theme-3-ksh-main: hsl(290, 70%, 36%); /*Key shadow*/

  /* Text */
  --theme-3-text: hsl(52, 100%, 62%);
  --theme-3-text-main: hsl(52, 100%, 62%);
  --theme-3-equals-text: hsl(198, 20%, 13%);
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--theme-1-main-bg);
  font-family: "League Spartan";
}

.container {
  min-width: 300px;
  /* max-width: 300px;
  min-width: 250px; */
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.top-section {
  display: flex;
  column-gap: 20px;
  align-items: baseline;
}
.top-section .calc {
  flex-grow: 1;
  font-size: 1.5rem;
  align-self: flex-end;
}
.top-section .theme {
  font-size: 0.6rem;
  padding-bottom: 2px;
  align-self: flex-end;
  letter-spacing: 1px;
  font-weight: 500;
}
.top-section p {
  color: var(--theme-1-text-main);
}

.toggle-container p {
  font-size: 0.7rem;
  letter-spacing: 7px;
  padding: 4.5px;
  font-weight: 500;
}

/* Toggle Switch */
.toggle-switch {
  width: 40px;
  height: 15px;
  background-color: var(--theme-1-tb-kpbg);
  border-radius: 15px;
  position: relative;
}

.switch-handle {
  width: 11px;
  height: 11px;
  background-color: var(--theme-1-kbg-tb-equals);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.3s ease-in-out;
}

.screen {
  font-size: var(--font-size-number);
  background-color: var(--theme-1-screen);
  color: var(--theme-1-text-main);
  text-align: right;
  padding: 0.7em 0.5em;
  border-radius: 0.5rem;
}

.btn-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background-color: var(--theme-1-tb-kpbg);
  padding: 1.3rem;
  gap: 0.9rem;
  border-radius: 0.5rem;
}
.btn-container button {
  font-size: 1.1rem;
  border: none;
  border-radius: 0.3rem;
  font-weight: 700;
  font-family: "League Spartan";
  color: var(--theme-1-text);
  background-color: var(--theme-1-kbg-main);
  padding: 0.6em 0 0.4em 0;
  box-shadow: 0 3px 0 var(--theme-1-ksh-main);
}
.btn-container button:hover {
  cursor: pointer;
}
.btn-container .del-btn {
  background-color: var(--theme-1-kbg-reset);
  box-shadow: 0 3px 0 var(--theme-1-ksh-reset);
  color: var(--reset-del-text);
}
.btn-container .reset-btn {
  color: var(--reset-del-text);
  background-color: var(--theme-1-kbg-reset);
  box-shadow: 0 3px 0 var(--theme-1-ksh-reset);
  font-size: 1.1rem;
  grid-column: 1/3;
  padding: 0.6em 0 0.4em 0;
  font-weight: 700;
}
.btn-container .equals-btn {
  color: var(--theme-1-equals-text);
  background-color: var(--theme-1-kbg-tb-equals);
  box-shadow: 0 3px 0 var(--theme-1-ksh-equals);
  font-size: 1rem;
  grid-column: 3/5;
}
@media (max-width: 360px) {
  .container {
    width: 90%;
  }
  .top-section {
    margin-bottom: 1rem;
  }
  .top-section .calc {
    font-size: 2rem;
  }
  .top-section .theme {
    font-size: 0.8rem;
  }

  .toggle-container p {
    font-size: 0.9rem;
    letter-spacing: 15px;
  }

  .toggle-switch {
    width: 60px;
    height: 22px;
  }

  .switch-handle {
    width: 15px;
    height: 15px;
    top: 3.5px;
    left: 3.5px;
  }

  .screen {
    font-size: calc(var(--font-size-number) + 10px);
    background-color: var(--theme-1-screen);
    color: var(--theme-1-text-main);
    text-align: right;
    padding: 0.7em 0.5em;
    border-radius: 0.5rem;
  }
  .btn-container {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
  }
  .btn-container button {
    padding: 1em;
    min-width: 0;
  }
}
