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

:root {
  font-size: 62.5%;
}

.theme {
  --theme: hsla(0, 0%, 100%, 1);

  --primary-color: hsl(240, 6%, 21%);
  --bg-card-sound: hsl(240, 9%, 89%);
  --bg-sound-select: hsl(194, 97%, 31%);
  --bg-slide-volume: #323238;
}

.dark {
  --theme: hsla(240, 5%, 7%, 1);

  --primary-color: hsla(0, 0%, 100%, 1);
  --bg-card-sound: hsla(240, 6%, 17%, 1);
  --bg-sound-select: hsl(194, 97%, 31%);
  --bg-buttons-icon-dark: hsla(240, 7%, 78%, 1);
  --bg-slide-volume: #FFFF;
}

body {
  font-family: 'Robo', sans-serif;

  color: var(--primary-color);
  background: var(--theme);

  /* display: flex;  */
  align-items: center;
  /* text-align: center; */
  justify-content: space-around; 

  height: 100vh;

  gap: clamp(1rem, 10vw, 19rem);
  transition: 1s;
}

header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
}

main {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 9rem auto;
}

.counter {
  max-width: 32.1rem;
  margin: 0 15rem 0 1.5rem ;

  font-size: 12rem;
}

/* .pause {
  width: 4.8rem;
  color: var(--bg-buttons-icon-dark);
} */

.buttons {
  margin-top: 1.7rem;

  display: flex;
  justify-content: space-between;

  transition: 1s;
}

button {
  background-color: transparent;
  border: none;

  cursor: pointer;
}

.sounds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 38rem;
  gap: 3.2rem;
}

.card {
  background-color: var(--bg-card-sound);

  border-radius: 2.4rem;
  max-width: 13rem;
  max-height: 15rem;
  padding: 4.8rem 4.2rem;
  cursor: pointer;
}

.sounds .card {
  position: relative;
  display: flex;
  flex-direction: column;
} 

.card input {
  position: absolute;
  left: 2rem;
  bottom: 2rem;
  width: 10rem;
}

.active {
  background: var(--bg-sound-select);
}

.active path {
  fill: var(--bg-card-sound);
}

.hide {
  display: none;
}

.switch {
  display: none;
}

label {
  cursor: pointer;
  margin-top: 3.6rem;
  margin-right: 3.6rem;
}

input[type=range]{
  -webkit-appearance: none;
  width: 9rem;
  height: .4rem;
  background: var(--bg-slide-volume);
  border-radius: 5px;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #323238;
  border-radius: 50%;
  background: var(--bg-slide-volume)
}

/* -------dark--------- */

.dark button svg path {
  fill: var(--bg-buttons-icon-dark);
}

@media (max-width: 800px) {
  main {
    flex-direction: column;
    margin: auto;
  }


  .counter {
    margin: 3rem auto 1.5rem;
  }

  .buttons {
    margin-top: 1.5rem;
  }

  .sounds {
    display: flex;
    flex-wrap: wrap;
    margin: 2.5rem auto;
    gap: 3rem;
    max-width: 30rem;
  }

  svg {
    text-align: center;
    align-items: center;
    height: 5rem;
  }
}
