body {
  margin: 0;
  background: #121212;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  font-family: sans-serif;
  color: white;
  position: relative;
  overflow: hidden;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 75%;
  height: 100%;
  background: #121212;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  pointer-events: none;
}

#overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Make only the content inside the overlay clickable */
#track-info,
#arrow {
  pointer-events: auto;
}

#track-info {
  position: absolute;
  top: 50%;
  right: 120px;
  margin-top: 100px; /* Half iframe height (352/2) + offset */
  font-size: 32px;
  font-weight: bold;
  color: #1db954;
  max-width: 60%; /* Limit width to ensure text wraps */
  word-wrap: break-word; /* Allow long words to be broken */
  overflow-wrap: break-word; /* Modern version of word-wrap */
  text-align: right; /* Align text to the right side */
  line-height: 1.2; /* Improve readability of wrapped text */
}

#arrow {
  position: absolute;
  top: 50%;
  right: 50px;
  margin-top: 100px; /* Same as text to align vertically */
  width: 60px;
  height: 60px;
  border-right: 8px solid #1db954;
  border-bottom: 8px solid #1db954;
  transform: rotate(-45deg);
}

#player-container {
  position: relative;
  width: 100%;
  max-width: 100%;
}

iframe {
  border-radius: 12px;
  max-width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #track-info {
    font-size: 24px;
    right: 80px;
    max-width: 70%; /* Increase max width on medium screens */
  }

  #arrow {
    right: 30px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  #track-info {
    font-size: 18px;
    right: 60px;
    max-width: 80%; /* Increase max width on small screens */
    margin-top: 80px; /* Adjust vertical position */
  }

  #arrow {
    right: 20px;
    width: 30px;
    height: 30px;
    margin-top: 80px; /* Match the text's margin-top */
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  #track-info {
    font-size: 16px;
    right: 50px;
    max-width: 85%; /* Even more width on very small screens */
    margin-top: 60px; /* Further adjust vertical position */
  }

  #arrow {
    right: 15px;
    width: 25px;
    height: 25px;
    margin-top: 60px; /* Match the text's margin-top */
  }
}
