/*Analog Clock Style */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: #2f363e;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.sound {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-right: 6rem;
}

.selectSound {
  margin-bottom: 4rem;
}

.selectSound select {
  --c: hsl(160deg 80% 50% / calc(0.25 + var(--val) / 125));
  appearance: none;
  background: transparent;
  color: whitesmoke;
  font-size: 1.5rem;
  padding: 0.5rem 1rem;
  border: 2px solid whitesmoke;
  border-radius: 1rem;
  width: 15rem;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 0 0.2em 0 hsl(0 0% 0%) inset,
    -0.1em 0.1em 0.1em -0.1em hsl(0 0% 100% / 0.5),
    0 0 calc(1em + 0.001em * var(--val)) calc(0.1em + 0.00025em * var(--val))
      var(--c);
  transition: box-shadow 0.3s ease;
}

.selectSound select:focus {
  outline: none;
  box-shadow: 0 0 0.5em 0 hsl(0 0% 0%) inset, 0 0 1em 0.1em var(--c),
    -0.1em 0.1em 0.2em -0.1em hsl(0 0% 100% / 0.5);
}

.selectSound select option {
  background: #2f363e;
  color: #1cd698;
  font-size: 1.5rem;
}

.volume {
  margin-bottom: 4rem;
}

label {
  font-size: 1.5rem;
  color: whitesmoke;
}

@property --c {
  syntax: "<color>";
  inherits: true;
  initial-value: #0000;
}

.glow {
  --c: rgb(0, 255, 255, calc(0.25 + var(--val) / 125));
  --c: hsl(160deg 80% 50% / calc(0.25 + var(--val) / 125));
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  width: 10rem;
  position: relative;
}

.glow::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: calc((var(--val) - 1) * 1%);
  min-width: 0.5em;
  height: 100%;
  background: var(--c);
  box-shadow: 0 0 0.2em 0 hsl(0 0% 0%) inset,
    -0.1em 0.1em 0.1em -0.1em hsl(0 0% 100% / 0.5),
    0 0 calc(1em + 0.001em * var(--val)) calc(0.1em + 0.00025em * var(--val))
      var(--c);
  border-radius: 1em 0 0 1em;
  opacity: calc(20% + var(--val) * 1%);
}

/***** Track Styles *****/
/***** Chrome, Safari, Opera, and Edge Chromium *****/
.glow::-webkit-slider-runnable-track {
  box-shadow: 0 0 0.2em 0 hsl(0 0% 0%) inset,
    -0.1em 0.1em 0.1em -0.1em hsl(0 0% 100% / 0.5);
  background: linear-gradient(to bottom right, #0001, #0000), #343133;
  border-radius: 1em;
  height: 1em;
}

/******** Firefox ********/
.glow::-moz-range-track {
  box-shadow: 0 0 2px 0 hsl(0 0% 0%) inset,
    -1px 1px 1px -1px hsl(0 0% 100% / 0.5);
  background: linear-gradient(var(--c) 0 0) 0 0 / calc(var(--val) * 1%) 100%
      no-repeat,
    linear-gradient(to bottom right, #0001, #0000), #343133;
  border-radius: 1em;
  height: 1em;
}

/***** Thumb Styles *****/
/***** Chrome, Safari, Opera, and Edge Chromium *****/
.glow::-webkit-slider-thumb {
  --d: var(--c);
  --d: rgb(from var(--c) r g b / calc(0.35 * var(--val) * 1%));
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  background-color: #5cd5eb;
  transform: translateY(calc(-50% + 0.5em));
  width: 4em;
  aspect-ratio: 1;
  background: red;
  border-radius: 50%;
  background: radial-gradient(
        farthest-side,
        #0000 22.5%,
        var(--d) 0,
        #0000 calc(var(--val) * 0.75%)
      )
      50% 50% / 100% 100% no-repeat,
    radial-gradient(#0000 15%, #343133 16%, #545153 20%),
    repeating-linear-gradient(#0000 0 10%, #0002 0 20%) 50% 50% / 25% 25%
      no-repeat,
    repeating-linear-gradient(90deg, #0000 0 10%, #0002 0 20%) 50% 50% / 25% 25%
      no-repeat,
    radial-gradient(var(--c) 17%, #0000 0), #545153;
  box-shadow: inset -0.15em -0.15em 0.2em #0008,
    inset 0.15em 0.15em 0.2em #ffffff22,
    inset calc(var(--val) * 1em / 500) 0em calc(var(--val) * 1em / 500)
      calc(var(--val) * -1em / 700) var(--c),
    0.25em 0.25em 0.5em #0006,
    calc(0.0125em * var(--val)) calc(0.005em * var(--val))
      calc(0.02em * var(--val)) calc(-0.01em * var(--val)) #000a;
  border-radius: 50%;
}

/***** Firefox *****/
.glow::-moz-range-thumb {
  /*   --d: var(--c);
  --d: rgb(from var(--c) r g b / calc(0.35 * var(--val) * 1%)); */
  border: none; /*Removes extra border that FF applies*/
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  background-color: #5cd5eb;
  width: 4em;
  height: 4em;
  aspect-ratio: 1;
  background: red;
  border-radius: 50%;
  background: 
/*     radial-gradient(farthest-side, #0000 22.5%, var(--d) 0, #0000 calc(var(--val) * 0.75%)) 50% 50% / 100% 100% no-repeat, */ radial-gradient(
      #0000 15%,
      #343133 16%,
      #545153 20%
    ),
    repeating-linear-gradient(#0000 0 10%, #0002 0 20%) 50% 50% / 25% 25%
      no-repeat,
    repeating-linear-gradient(90deg, #0000 0 10%, #0002 0 20%) 50% 50% / 25% 25%
      no-repeat,
    radial-gradient(var(--c) 17%, #0000 0), #545153;
  box-shadow: inset -0.15em -0.15em 0.2em #0008,
    inset 0.15em 0.15em 0.2em #ffffff22,
    inset calc(var(--val) * 1em / 500) 0em calc(var(--val) * 1em / 500)
      calc(var(--val) * -1em / 700) var(--c),
    0.25em 0.25em 0.5em #0006,
    calc(0.015em * var(--val)) calc(0.005em * var(--val))
      calc(0.02em * var(--val)) calc(-0.01em * var(--val)) #0008;
  border-radius: 50%;
}

.container {
  position: relative;
  background: #2f363e;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.clock {
  position: relative;
  width: 450px;
  height: 450px;
  background: #2f363e;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.clock::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: #2f363e;
  border-radius: 50%;
  z-index: 100;
}

.clock span {
  position: absolute;
  inset: 20px;
  color: whitesmoke;
  text-align: center;
  transform: rotate(0deg);
}

/* Align the numbers around the clock face, moving them 3 positions counter-clockwise */

.clock span:nth-child(4) {
  transform: rotate(30deg);
}

.clock span:nth-child(5) {
  transform: rotate(60deg);
}

.clock span:nth-child(6) {
  transform: rotate(90deg);
}

.clock span:nth-child(7) {
  transform: rotate(120deg);
}

.clock span:nth-child(8) {
  transform: rotate(150deg);
}

.clock span:nth-child(9) {
  transform: rotate(180deg);
}

.clock span:nth-child(10) {
  transform: rotate(210deg);
}

.clock span:nth-child(11) {
  transform: rotate(240deg);
}

.clock span:nth-child(12) {
  transform: rotate(270deg);
}

.clock span:nth-child(13) {
  transform: rotate(300deg);
}

.clock span:nth-child(14) {
  transform: rotate(330deg);
}

.clock span b {
  font-size: 3em;
  font-weight: 600;
  display: inline-block;
  transform: rotate(0deg); /* Initial rotation */
}

/* Adjust the rotation of the numbers to make them face outward */

.clock span:nth-child(4) b {
  transform: rotate(-30deg);
}

.clock span:nth-child(5) b {
  transform: rotate(-60deg);
}

.clock span:nth-child(6) b {
  transform: rotate(-90deg);
}

.clock span:nth-child(7) b {
  transform: rotate(-120deg);
}

.clock span:nth-child(8) b {
  transform: rotate(-150deg);
}

.clock span:nth-child(9) b {
  transform: rotate(-180deg);
}

.clock span:nth-child(10) b {
  transform: rotate(-210deg);
}

.clock span:nth-child(11) b {
  transform: rotate(-240deg);
}

.clock span:nth-child(12) b {
  transform: rotate(-270deg);
}

.clock span:nth-child(13) b {
  transform: rotate(-300deg);
}

.clock span:nth-child(14) b {
  transform: rotate(-330deg);
}

.circle {
  position: absolute;
  width: 300px;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.circle i {
  position: absolute;
  width: 9px;
  height: 60%;
  background: whitesmoke;
  opacity: 0.75;
  transform-origin: bottom;
  transform: scaleY(0.5);
}

.circle:nth-child(1) i {
  width: 3px;
  height: 99%;
  background: #1cd698;
}

.circle:nth-child(2) i {
  width: 6px;
  height: 85%;
  background: whitesmoke;
}

/* digital clock style */

#time {
  margin-bottom: -80px;
  display: flex;
  transform: translateY(15px);
  padding: 10px 10px;
  font-size: 2em;
  font-weight: 600;
  border: 2px solid rgba(0, 0, 0, 0.5);
  border-radius: 40px;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5),
    inset 5px 5px 20px rgba(255, 255, 255, 0.2),
    inset -5px -5px 15px rgba(0, 0, 0, 0.75);
  margin-left: 15px;
}

#time div {
  position: relative;
  width: 60px;
  text-align: center;
  font-weight: 500;
  color: #1cd698;
}

#time div:nth-child(1)::after,
#time div:nth-child(2)::after {
  content: ":";
  position: absolute;
  right: -4px;
}



#time div:last-child {
  font-size: 0.5em;
  display: flex;
  justify-content: center;
  align-items: center;
  color: whitesmoke;
}

#time div:nth-child(2)::after {
  animation: animate 1s steps(1) infinite;
}

@keyframes animate {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.marker {
  position: absolute;
  background: whitesmoke;
  top: 1;
  left: 50%;
  transform-origin: bottom;
}


/* Make Responsive */

@media screen and (max-width: 768px) {
  .container {
    border-radius: 10px;
  }

  .clock {
    width: 300px;
    height: 300px;
  }

  .clock span {
    inset: 15px;
  }

  .clock span b {
    font-size: 1.5em;
  }

  .circle {
    width: 200px;
    height: 200px;
  }

  .circle i {
    width: 6px;
    height: 60%;
  }

  .circle:nth-child(1) i {
    width: 1px;
    height: 99%;
  }

  .circle:nth-child(2) i {
    width: 3px;
    height: 85%;
  }
}

@media screen and (max-width: 480px) {
  .container {
    border-radius: 0;
  }

  .clock {
    width: 200px;
    height: 200px;
  }

  .clock span {
    inset: 10px;
  }

  .clock span b {
    font-size: 1em;
  }

  .circle {
    width: 120px;
    height: 120px;
  }

  .circle i {
    width: 6px;
    height: 60%;
  }

  .circle:nth-child(1) i {
    width: 1px;
    height: 99%;
  }

  .circle:nth-child(2) i {
    width: 3px;
    height: 85%;
  }

}

@media screen and (max-width: 768px) {
  body {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
  }

  .sound {
    margin: 1rem auto;
  }

  #time {
    font-size: 1.5em;
    padding: 5px 5px;
    margin-left: 10px;
  }

  #time div {
    width: 50px;
  }

  #time div:last-child {
    font-size: 0.4em;
  }
}

@media screen and (max-width: 480px) {
  body {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
  }

  .sound {
    margin: 1rem auto;
  }

  .selectSound, .volume {
    margin-bottom: 2rem;
  }

  .selectSound select {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    width: 10rem;
  }

  .selectSound select option {
    font-size: 1rem;
  }

  label {
    font-size: 1rem;
  }

  .glow {
    width: 8rem;
  }

  .glow::-webkit-slider-thumb {
    width: 2em;
  }

  #time {
    font-size: 1em;
    padding: 2px 2px;
    margin-left: 5px;
  }

  #time div {
    width: 40px;
  }

  #time div:last-child {
    font-size: 0.3em;
  }
}
