.window-hidden {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  z-index: 9999;
  background-color: black;
  border: 1px solid #d3d3d3;
  top: 0;
  width: 40rem;
  font-family: Syne Mono;
  font-size: 1.5rem;
  transition: opacity 0.1s ease-in-out;
}

.window-visible {
  opacity: 1;
  pointer-events: auto;
  position: absolute;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.692);
  backdrop-filter: blur(10px);
  border: 1px solid #d3d3d3;
  top: 5rem;
  left: 5rem;
  width: 40rem;
  font-family: Syne Mono;
  font-size: 1.5rem;
  cursor: auto;
}

.window-visible,
.window-hidden {
  height: auto;
  max-height: 90vh; /* stay within viewport height */
  overflow: hidden; /* prevent content spilling out */
  box-sizing: border-box;
}

.window-visible.fade-in {
  opacity: 1;
}

.window-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 5px;
  cursor: move;
  z-index: 9999;
  color: #fff;
  padding-left: 1rem;
  border-bottom: 1px solid #d3d3d3;
  align-items: center;
}

.window-utility {
  display: flex;
}

.window-header p {
  margin: 0;
}

.window-close {
  width: 3rem;
  height: 1.5rem;
  margin-right: 0px;
  align-self: center;
  color: rgb(199, 221, 246);
  z-index: 9000;
  cursor: pointer;
}
.window-close:hover {
  filter: url(#global-glow);
}

.window-maximize {
  width: 2rem;
  height: 2rem;
  color: rgb(199, 221, 246);
  background: none;
  border: none;
  z-index: 9000;
  cursor: pointer;
}

.window-maximize:hover {
  filter: url(#global-glow);
}

.window-minimize {
  margin-right: 0.5rem;
  width: 1.5rem;
  height: 2rem;
  color: rgb(199, 221, 246);
  background: none;
  border: none;
  z-index: 9000;
  cursor: pointer;
  transform: translatey(8px);
}

.window-minimize:hover {
  filter: url(#global-glow);
}

.maximize {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100dvh !important; /* dynamic viewport height */
  z-index: 9999 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  max-height: none;
}

.minimize {
  display: none;
}

/* Starting state for animation */
.window-hidden.minimizing {
  transition: transform 0.5s ease, opacity 0.5s ease;
  transform: scale(0.5) translateX(-50%);
  opacity: 0;
}

/* Hidden after animation */
.window-hidden.hidden {
  display: none;
}

/* Music Player */

.music-content {
  display: flex;
  flex-direction: column;
  color: #d3d3d3;
  z-index: 9999;
  height: auto;
  max-height: 100%;
  position: abso;
  margin-top: 2rem;
}
.music-info img {
  height: 10rem;
  border: 1px solid #d3d3d3;
}

.music-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: auto;
  text-align: center;
  font-size: 10pt;
  margin-top: 1rem;
}

.music-metadata {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  margin-top: 10px;
}

.music-metadata h2,
.music-metadata p {
  font-family: monospace;
  font-weight: 100;
  margin: 0;
}

.music-time,
.music-bar {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.music-time {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12pt;
  font-family: monospace;
  color: #555;
  margin-bottom: 6px;
}

.music-bar {
  background: #efefefa9;
  height: 4px;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
}

.music-bar #length {
  width: 0%;
  background: #2196f3;
  height: 100%;
  transition: width linear 200ms;
}

.music-control {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.music-control__backward,
.music-control__forward,
.music-control__play {
  display: flex;
  justify-content: center;
  align-items: center;
  fill: white;
}

.music-control svg {
  display: block;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.music-control svg:hover {
  transform: scale(1.1);
}

.music-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  border-radius: 1rem;
  font-size: 15px;
}

.music-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.music-overlay__content {
  text-align: center;
  color: #fff;
  font-family: monospace;
}

.music-overlay__buttons {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

.music-btn {
  text-decoration: none;
  padding: 0.5rem 1.5rem;
  font-weight: light;
  color: #fff;
  transition: background 0.3s ease;
  border: 1px solid white;
}

.music-btn.spotify:hover {
  background: #a56223;
}

.music-btn.apple:hover {
  background: #d91f34;
}

.music-btn.youtube:hover {
  background: #d40000;
}
.music-btn.bandcamp:hover {
  background: #3b88ec;
}

.music-control__stream {
  position: absolute;
  right: 20px;
  background-color: transparent;
  text-decoration: none;
  padding: 0.5rem 0.5rem;
  font-weight: light;
  color: #fff;
  transition: background 0.3s ease;
  border: 1px solid white;
  font-family: monospace;
}
.music-control__lyrics {
  position: absolute;
  left: 20px;
  background-color: transparent;
  text-decoration: none;
  padding: 0.5rem 0.5rem;
  font-weight: light;
  color: #fff;
  transition: background 0.3s ease;
  border: 1px solid white;
  font-family: monospace;
}

.music-control__stream:hover {
  background-color: white;
  color: black;
}
.music-control__lyrics:hover {
  background-color: white;
  color: black;
}

.lyrics {
  text-align: center;
  display: none;
  padding-left: 12rem;
  padding-right: 12rem;
  margin-bottom: 2rem;
  font-size: 16px;
  max-height: 40vh; /* or try something like 300px if you want */
  overflow-y: auto; /* vertical scroll only */
  overflow-x: hidden; /* no side scrollbars */
}

.lyrics.active {
  display: flex;
}

/* Moblie Player */

.window-m-hidden {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  z-index: 9999;
  background-color: black;
  border: 1px solid #d3d3d3;
  top: 0;
  font-family: Syne Mono;
  font-size: 1.5rem;
  transition: opacity 0.1s ease-in-out;
}

.window-m-visible {
  opacity: 1;
  pointer-events: auto;
  position: fixed;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.692);
  backdrop-filter: blur(10px);
  border: 1px solid #d3d3d3;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  font-family: Syne Mono;
  font-size: 1.5rem;
  cursor: auto;
  max-height: none;
}

@media (max-width: 600px) {
  .window-visible {
    opacity: 1;
    pointer-events: auto;
    position: fixed;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.692);
    backdrop-filter: blur(10px);
    border: 1px solid #d3d3d3;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    font-family: Syne Mono;
    font-size: 1.5rem;
    cursor: auto;
    max-height: none;
  }
  .window-hidden {
    opacity: 0;
    display: none;
    pointer-events: auto;
    position: fixed;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.692);
    backdrop-filter: blur(10px);
    border: 1px solid #d3d3d3;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    font-family: Syne Mono;
    font-size: 1.5rem;
    cursor: auto;
    max-height: none;
  }
  .music-control-m__stream {
    position: absolute;
    right: 20px;
    background-color: transparent;
    text-decoration: none;
    padding: 0.5rem 0.5rem;
    font-weight: light;
    color: #fff;
    transition: background 0.3s ease;
    border: 1px solid white;
    font-family: monospace;
  }
  .music-control-m__lyrics {
    position: absolute;
    left: 20px;
    background-color: transparent;
    text-decoration: none;
    padding: 0.5rem 0.5rem;
    font-weight: light;
    color: #fff;
    transition: background 0.3s ease;
    border: 1px solid white;
    font-family: monospace;
  }

  .music-control-m__stream:hover {
    background-color: white;
    color: black;
  }
  .music-control-m__lyrics:hover {
    background-color: white;
    color: black;
  }

  .lyrics-m {
    position: fixed;
    top: 3rem;
    left: 0;
    background-color: rgb(0, 0, 0);
    text-align: center;
    opacity: 0; /* start invisible */
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding-left: 6rem;
    padding-right: 6rem;
    margin-bottom: 6rem;
    font-size: 16px;
    height: 60vh;
    max-height: none; /* or try something like 300px if you want */
    overflow-y: auto; /* vertical scroll only */
    overflow-x: hidden; /* no side scrollbars */
    z-index: 9999;
  }

  .lyrics-m.active {
    opacity: 1;
    visibility: visible;
  }

  .music-overlay-m {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    border-radius: 1rem;
    font-size: 15px;
    z-index: 9999;
  }

  .music-overlay-m.active {
    opacity: 1;
    pointer-events: all;
  }
  .music-overlay-m__buttons {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
  }

  .music-btn-m {
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    font-weight: light;
    color: #fff;
    transition: background 0.3s ease;
    border: 1px solid white;
  }

  .music-btn-m.spotify:hover {
    background: #a56223;
  }

  .music-btn-m.apple:hover {
    background: #d91f34;
  }

  .music-btn-m.youtube:hover {
    background: #d40000;
  }
  .music-btn-m.bandcamp:hover {
    background: #3b88ec;
  }

  .music-bar {
    background: #efefefa9;
    height: 4px;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer;
  }

  .music-bar #length-m {
    width: 0%;
    background: #2196f3;
    height: 100%;
    transition: width linear 200ms;
  }

  .music-time,
  .music-bar {
    max-width: 350px;
    width: 100%;
    margin: 0 auto;
  }
  .music-info {
    position: absolute;
    bottom: 0.5rem;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 10pt;
  }
  .music-img-m {
    display: flex;
    margin-top: 2rem;
    justify-content: center;
  }
  .music-img-m img {
    height: 20rem;
    border: 1px solid #d3d3d3;
  }
  .music-metadata {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    align-items: ;
  }
  .window-close-m {
    width: 3rem;
    height: 1.5rem;
    margin-right: 0px;
    align-self: center;
    color: rgb(199, 221, 246);
    z-index: 9000;
    cursor: pointer;
  }
  .window-close-m:hover {
    filter: url(#global-glow);
  }
}
