:root {
  --base: 00;
  --bg-color: #fff;
  --bg-card: #e1e1e6;
  --text-color: #323239;
  --fg-card-active: #fff;
  --accent-color: #02789c;
  --fg-display: #000;
  --slider-color: #323232;
  --shadow: rgba(0, 0, 0, 0.562);

  --mode: 'light';

  box-sizing: border-box;
  font-size: 62.5%;
}

/* @media (prefers-color-scheme: dark) {
  :root {

    --base: 00;
    --bg-color: #000;
    --bg-card: #29292E;
    --text-color: #c4c4cc;
    --accent-color: #0A3442;

    --mode: 'dark';

  }
} */

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 1.6rem;
}

body.dark {
  --base: 00;
  --bg-color: #000;
  --bg-card: #29292E;
  --text-color: #c4c4cc;
  --fg-card-active: #fff;
  --accent-color: #0A3442;
  --fg-display: #fff;
  --slider-color: #fff;
  --shadow: #00bfff94;



}

body {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: clamp(8rem, 10vw, 19.2rem);

  height: 100vh;

  font-family: 'Roboto', sans-serif;

  color: var(--text-color);
  background: var(--bg-color);

  transition: 600ms ease-in-out;
}

.hide {
  display: none;


}

.theme-mode{
  position: fixed;
  top: 6.4rem;
  right: 6.4rem;
  /* border: 1px solid red; */
  width: 4.4rem;
  height: 4.4rem;

  
}

.theme-mode button {
  background: transparent;
  /* background: rgba(119, 0, 0, 0.533); */
  border: 0;
  border-radius: 999px;
  outline-offset: 4px;

  width: 100%;
  height: 100%;

  animation-duration: 600ms;
  animation-name: slidein;


}

@keyframes slidein {
  from {
    /* transform: translateX(50px) translateY(-50px); */
    transform: translate3d(50px, -50px, 0);
  }

  to {
    /* transform: translateX(0) translateY(0); */
    transform: translate3d(0);
  }
}


.timer {
  display: grid;
  justify-self: center;
  gap: 4.8rem;
}

.display {
  font: 500 normal 12.6rem/14.8rem 'Roboto', sans-serif;
  color: var(--fg-display);
}
.controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.controls button,
.card button {
  border: 0;
  background-color: transparent;
  cursor: pointer;
}

.controls button{
  display: flex;
  border-radius: 999px;
  outline-offset: 3px;
  align-items: center;
  justify-items: center;

}

.card button {
  width: 100%;
  border-radius: 2.4rem;
  outline-offset: -2px;
}

.card button svg {
  margin-bottom: 3rem;
}

button > svg path {
  fill: var(--text-color);

  transition: 300ms ease-out;

}

button:hover > svg path {
  fill: var(--accent-color);
  transition: 300ms ease-in;

}

.cards {
  display: grid;
  gap: 3.2rem;
  grid-template-columns: repeat(2, 1fr);
  justify-self: center;
}

.card {
  width: 13.8rem;
  height: 15.2rem;
  background: var(--bg-card);
  border-radius: 2.4rem;
  display: flex;
  justify-content: center;

  /* overflow: hidden; */
  transition: 300ms ease-out;

  position: relative;

  -moz-box-shadow: 1px 1px 3px 1px var(--shadow);
  -webkit-box-shadow: 1px 1px 3px 1px var(--shadow);
  box-shadow: 1px 1px 3px 1px var(--shadow);

}
.card button {
  transition: 300ms ease-out;

}

.card button.active {
  background: var(--accent-color);
  transition: 300ms ease-in ;
}


button.active  svg path {
  fill: var(--fg-card-active);
  transition: 300ms ease-out;

}

button.active:hover  svg path {
  /* * fill: var(--text-color);  */
  transition: 300ms ease-in;
  /* * filter: invert() brightness(1.2); */

} 

.card .volume {
  width: 9rem;

  position: absolute;

  bottom: 1.5rem;
  left: 2.4rem;
}

.volume {
  height: 2.2rem;
  -webkit-appearance: none;
  margin: 1rem 0;
  width: 100%;
  background: transparent;
  cursor: grab;

}
/* .volume:focus {
  outline: none;
} */
.volume::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  /* animate: 0.2s; */
  box-shadow: 0px 0px 0px #0000;
  background: var(--slider-color);
  border-radius: 50px;
  border: 0px solid #0000;
}
.volume::-webkit-slider-thumb {
  box-shadow: 0px 0px 0px var(--slider-color);
  border: 0px solid #0000;
  height: 16px;
  width: 16px;
  border-radius: 50px;
  background: var(--slider-color);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
}
.volume:focus::-webkit-slider-runnable-track {
  background: var(--slider-color);
}
.volume::-moz-range-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  /* animate: 0.2s; */
  box-shadow: 0px 0px 0px #0000;
  background: var(--slider-color);
  border-radius: 50px;
  border: 0px solid #0000;
}
.volume::-moz-range-thumb {
  box-shadow: 0px 0px 0px var(--slider-color);
  border: 0px solid #0000;
  height: 16px;
  width: 16px;
  border-radius: 50px;
  background: var(--slider-color);
  cursor: pointer;
}
.volume::-ms-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  /* animate: 0.2s; */
  background: transparent;
  border-color: transparent;
  color: transparent;
}
.volume::-ms-fill-lower {
  background: var(--slider-color);
  border: 0px solid #0000;
  border-radius: 100px;
  box-shadow: 0px 0px 0px #0000;
}
.volume::-ms-fill-upper {
  background: var(--slider-color);
  border: 0px solid #0000;
  border-radius: 100px;
  box-shadow: 0px 0px 0px #0000;
}
.volume::-ms-thumb {
  margin-top: 1px;
  box-shadow: 0px 0px 0px var(--slider-color);
  border: 0px solid #0000;
  height: 16px;
  width: 16px;
  border-radius: 50px;
  background: var(--slider-color);
  cursor: pointer;
}
.volume:focus::-ms-fill-lower {
  background: var(--slider-color);
}
.volume:focus::-ms-fill-upper {
  background: var(--slider-color);
}

.active .volume {
  --slider-color: #fff;
}

/* Mobile ===================================================== */


@media screen and (max-width: 800px) {
  body {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 6vh , 10rem);

  }

  .theme-mode{
    top: 5vw;
    right: 10vw;
    /* width: 2rem; */
    /* height: 2rem; */
  }

  .timer {
    margin-top: 3rem;

    gap: 1rem;
  }

  .display {
    font-size: clamp(9rem, 20vw, 12rem);
  }
  
  .cards {
    gap: 2.5vw;
  }

}