* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: auto;
  font-family: sans-serif;
  background-color: rgb(1, 1, 1);
  background-image: linear-gradient (#ffe5e5);
  color: white;
  transition: background-color 500ms ease;
} /* header */
header {
  position: absolute;
  z-index: 999;
  text-align: center;
  top: 0rem;
  text-decoration: aquamarine;
  padding: 1rem;
  background: inherit;
}
.container {
  position: relative;
  width: min(300px, 100%);
}

ul {
  list-style: none;
  width: 100%;
  height: 80%;
  position: relative;
  perspective: 900px;
  transform-style: preserve-3d;
}

ul > li {
  position: absolute;
  left: 50%;
  top: calc(50% - 1.2rem);
  --rotateX: calc(
    1deg * var(--rotateDegrees) * calc(var(--day_idx) - var(--currentDay))
  );
  transform: rotateX(var(--rotateX)) translateZ(190px) translateX(-50%)
    scale(var(--scale, 1));
  --hue: calc(var(--rotateDegrees) * var(--day_idx));
  background-color: hsl(var(--hue), 50%, var(--lightness, 50%));
  width: 115%;
  color: white;
  display: grid;
  grid-template-columns: 2.5rem auto;
  height: 1.4rem;
  transition: transform 900ms ease, background-color 900ms ease;
}
ul > li.active {
  --lightness: 30%;
  --scale: 1.1;
}
ul > li > * {
  display: grid;
  align-items: center;
}
li > time {
  text-align: center;
}
li > span {
  padding-inline-start: 0.5rem;
  color: white;
} /* controls */
.controls {
  position: absolute;
  top: 50%;
  left: 124%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.controls button {
  width: 1.5rem;
  aspect-ratio: 1;
  font-size: 1.5rem;
  color: rgb(106, 245, 25);
  border: none;
  display: flex;
  place-items: center;
}
.controls button:hover,
.controls button:focus {
  background: red;
}
.controls button:active {
  transform: scale(1.1);
}
.border {
  width: 96%;
  height: 3em;
  border: 1px solid white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@media screen and (max-width: 1300px) {
  .container{
    display: flex;
  }
}