#meditation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

#player-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 98%;
  height: 110px;
  max-width: 600px;
  z-index: 105;
}

#player-bg-artwork {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: url(./images/record-green.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50%;
  filter: blur(40px);
  -webkit-filter: blur(40px);
  z-index: 101;
  max-width: 600px;
  margin: 0 auto;
}

#player-bg-layer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #000;
  opacity: 0.7;
  z-index: 101;
  max-width: 600px;
  margin: 0 auto;
}

#player {
  position: relative;
  height: 100%;
  z-index: 3;
}

#player-track {
  position: absolute;
  top: 0;
  right: 15px;
  left: 15px;
  padding: 12px 16px 12px 164px;
  background-color: #000000bd;
  border-radius: 15px 15px 0 0;
  transition: 0.3s ease top;
  z-index: 1;
}

#player-track.active {
  top: -88px;
}

#album-name {
  color: var(--icon-color);
  font-size: 17px;
  font-weight: bold;
}

#track-name {
  color: #acaebd;
  font-size: 16px;
  margin: 2px 0 13px 0;
}

#track-time {
  margin-bottom: 3px;
  overflow: hidden;
}

#current-time {
  float: left;
}

#track-length {
  float: right;
}

#current-time,
#track-length {
  color: transparent;
  background-color: limegreen;
  border-radius: 10px;
  transition: 0.3s ease all;
}

#track-time.active #current-time,
#track-time.active #track-length {
  color: limegreen;
  background-color: transparent;
}

#seek-bar-container,
#seek-bar {
  position: relative;
  height: 4px;
  border-radius: 4px;
}

#seek-bar-container {
  background-color: #aaaaaa3d;
  cursor: pointer;
}

#seek-time {
  position: absolute;
  top: -29px;
  color: #fff;
  font-size: 12px;
  white-space: pre;
  padding: 5px 6px;
  border-radius: 4px;
  display: none;
}

#s-hover {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  opacity: 0.2;
  z-index: 2;
}

#seek-time,
#s-hover {
  background-color: #3b3d50;
}

#seek-bar {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background-color: limegreen;
  transition: 0.2s ease width;
  z-index: 1;
}

#player-content {
  position: relative;
  height: 100%;
  background-color: #111111;
  box-shadow: 0 30px 80px #656565;
  border-radius: 15px;
  z-index: 2;
}

#album-art {
  position: absolute;
  top: -40px;
  width: 115px;
  height: 115px;
  margin-left: 40px;
  transform: rotateZ(0);
  transition: 0.3s ease all;
  box-shadow: 0 0 0 0px #000;
  border-radius: 50%;
  overflow: hidden;
}

#album-art.active {
  top: -60px;
  box-shadow: 0 0 0 0px #000, 0 30px 50px -15px #afb7c1;
}

#album-art:before {
  content: "";
  position: absolute;
  top: 53%;
  right: 0;
  left: 0;
  width: 10px;
  height: 10px;
  margin: -10px auto 0 auto;
  background-color: #262626;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #000;
  z-index: 2;
}

#album-art img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: -1;
}

#album-art img.active {
  opacity: 1;
  z-index: 1;
}

#album-art.active img.active {
  z-index: 1;
  animation: rotateAlbumArt 3s linear 0s infinite forwards;
}

@keyframes rotateAlbumArt {
  0% {
    transform: rotateZ(0);
  }
  100% {
    transform: rotateZ(360deg);
  }
}

#album-art img,
#buffer-box {
  transition: 0.1s linear all;
}

#album-art.buffering img {
  opacity: 0.25;
}

#album-art.buffering img.active {
  opacity: 0.8;
  filter: blur(2px);
  -webkit-filter: blur(2px);
}

#album-art.buffering #buffer-box {
  opacity: 1;
}

#close-icon {
  position: fixed;
  top: calc(20px + var(--safe-area-top, 0px));
  right: 20px;
  z-index: 110;
  cursor: pointer;
  color: var(--icon-color);
  font-size: 30px;
}

#meditation-page-title {
  position: fixed;
  top: calc(70px + var(--safe-area-top, 0px));
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 1.5em;
  color: #fff;
  z-index: 110;
  padding: 0 20px;
  box-sizing: border-box;
}

#player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 100%;
  margin: 0 24px 0 141px;
  float: right;
}

.control {
  display: flex;
  align-items: center;
  justify-content: center;
}

.meditation-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: radial-gradient(circle at 35% 30%, #2a2a2a 0%, #141414 55%, #0a0a0a 100%);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 50%;
  cursor: pointer;
  color: var(--icon-color);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.meditation-button:hover {
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow:
    0 2px 14px rgba(74, 222, 128, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
}

.meditation-button:active {
  transform: scale(0.94);
}

#play-pause-button {
  width: 54px;
  height: 54px;
  border-color: rgba(74, 222, 128, 0.45);
  background: radial-gradient(circle at 35% 30%, #1a3324 0%, #111 55%, #0a0a0a 100%);
  box-shadow:
    0 3px 16px rgba(74, 222, 128, 0.12),
    0 2px 10px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
}

#play-pause-button:hover {
  box-shadow:
    0 3px 20px rgba(74, 222, 128, 0.25),
    0 2px 10px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
}

.meditation-button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

#play-pause-button svg {
  width: 22px;
  height: 22px;
}
