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

  font-size: 62.5%;
}

:root {
  --font-timer: 'Roboto', sans-serif;

  --font-timercolor: hsl(240, 7%, 21%);
  --bg-color: hsla(0, 0%, 94%, 0.53);
  --bg-card: hsl(240, 9%, 89%);
  --bg-cardcolor: hsl(194, 97%, 31%);
  --icon-color: hsl(0, 0%, 100%);
  --bg-home: url(https://i.giphy.com/media/IiG1Moma7qgN2/giphy.webp);
  --bg-tree: url(https://i.giphy.com/media/THKr9ClAOJAFa/giphy.webp);
  --bg-rain: url(https://i.giphy.com/media/gRnSZSRzOJeG4/giphy.webp);
  --bg-shop: url(https://i.giphy.com/media/WvN7uCpZaNNXW/giphy.webp);
  --bg-fire: url(https://i.giphy.com/media/lMUGMp2lImgGA/giphy.webp);
}

.dark {
  --font-timercolor: #ebebef;
  --bg-color: #0000007b;
  --bg-card: #29292E;
  --bg-cardcolor: #0A3442;
  --icon-color: #FFFFFF;
  --bg-home: url(https://i.giphy.com/media/heOKY8nrJUMfK/giphy.webp);
  --bg-tree: url(https://i.giphy.com/media/xTiTnzlDKzOoIN9br2/giphy.webp);
  --bg-rain: url(https://i.giphy.com/media/v0R4uwLqGKvQY/giphy.webp);
  --bg-shop: url(https://i.giphy.com/media/Q6joirtIBHUsw/giphy.webp);
  --bg-fire: url(https://i.giphy.com/media/ontuGIyllqCRO/giphy.webp);
}

body {
  background: var(--bg-color);
}

.page,
body {
  display: grid;
}

.container {
  background: var(--bg-color);
  border-radius: 1.5rem;
  margin: 0 auto;
  padding: 6rem;
}

.background {
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
}

#mode button {
  padding: .8rem;
  background: var(--bg-color);
  border-radius: 50%;
}

.bg-home {
  background-image: var(--bg-home);
}

.bg-tree {
  background-image: var(--bg-tree);
}

.bg-rain {
  background-image: var(--bg-rain);
}

.bg-shop {
  background-image: var(--bg-shop);
}

.bg-fire {
  background-image: var(--bg-fire);
}

main {
  margin: 6rem 0 5rem;
  justify-self: center;
  color: var(--font-timercolor);
  font-family: var(--font-timer);
  width: clamp(24rem, 1rem + 48vw, 32rem);
}

#timer {
  font-size: clamp(15.6rem, 9.5rem + 10vw, 20rem);
  display: flex;
  justify-content: space-between;
  gap: 1px;
  margin-bottom: 1.7rem;
  line-height: 14.8rem;
}

button {
  background: var(--bg-color);
  border: none;
  cursor: pointer;
}

button:hover {
  transform: scale(1.2);
  transition: transform 400ms ease;
}

.button {
  width: clamp(3.2rem, 1rem + 10vw, 5.8rem);
}

button .mode {
  transition: none;
}

#mode {
  margin: 6rem 6rem 0 0;
  display: grid;
  justify-content: end;
}

.controls {
  display: flex;
  justify-content: space-between;
}

button {
  background: none;
}

.hide {
  display: none;
}

.buttonPressed {
  border: 0 solid var(--bg-color);
}

.card-background {
  fill: var(--bg-card);
}

.icon-color,
.control {
  fill: var(--font-timercolor);
}

.soundOnBackground {
  fill: var(--bg-cardcolor);
}

.soundOnIcon {
  fill: var(--icon-color);
}

.cards {
  justify-self: center;
  width: clamp(24rem, 1rem + 48vw, 32rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3.2rem;
}

.card {
  position: relative;
}

.volumeOn {
  --font-timercolor: hsl(0, 0%, 100%);
}

.volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  border: none;
  background-color: var(--font-timercolor);
  height: 1.2rem;
  width: 1.2rem;
  border-radius: 50%;
}

.volume {
  top: calc(50% - 4px/2);
  -webkit-appearance: none;
  all: unset;
  background-color: var(--font-timercolor);
  position: absolute;
  width: clamp(8rem, 1rem + 12vw, 11rem);
  border-radius: 10px;
  height: 0.4rem;
  display: none;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.volume-shows {
  display: grid;
}

input[type="range" i] {
  line-height: 0.4rem;
}

.card-wrapper {
  display: grid;
  justify-items: center;
  align-items: end;
}

.tree svg,
.rain svg,
.shop svg,
.fire svg {
  width: clamp(10rem, 1rem + 15vw, 13.8rem);
  height: clamp(11.4rem, 1rem + 20vw, 15.2rem);
  object-fit: cover;
}

@keyframes show {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@media(min-width: 900px) {
  .page {
    width: 82.1rem;
    display: flex;
    gap: 19.2rem;
  }
}