/* Track Details Modal — kosmik-dstroyer */

.track-details-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3000;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s;
}
.track-details-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.track-details-modal {
  position: relative;
  background: #181818;
  border: 2px solid #ffb300;
  border-radius: 0.5rem;
  max-width: 720px;
  width: 96vw;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .track-details-overlay {
    align-items: flex-end;
  }
  .track-details-modal {
    width: 100vw;
    max-width: 100vw;
    height: 92dvh;
    max-height: 92dvh;
    border-radius: 0.75rem 0.75rem 0 0;
    border-bottom: none;
  }
  .tdm-cover {
    width: 72px;
    height: 72px;
  }
  .tdm-title {
    font-size: 1.1rem;
  }
  .tdm-artist {
    font-size: 0.95rem;
  }
  .tdm-close {
    font-size: 2rem;
    padding: 0.5rem 0.75rem;
    min-width: 44px;
    min-height: 44px;
  }
  .tdm-similar-item, .tdm-other-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.5em 0.9em;
  }
  .tdm-preview-audio {
    max-width: 100%;
  }
}

.tdm-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.2rem 1rem 1.2rem;
  border-bottom: 1px dashed #ffb300;
}
.tdm-cover {
  width: 100px;
  height: 100px;
  background: #222;
  border-radius: 0.25rem;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px #ffb30044;
}
.tdm-header-info {
  flex: 1;
  min-width: 0;
}
.tdm-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffb300;
  margin-bottom: 0.2em;
  line-height: 1.2;
  word-break: break-word;
}
.tdm-artist {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.2em;
  font-weight: 500;
}
.tdm-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #ffb300;
  font-size: 2rem;
  cursor: pointer;
  padding: 0 0.5em;
  line-height: 1;
  transition: color 0.2s;
}
.tdm-close:hover {
  color: #fff;
}

.tdm-section {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #222;
}
.tdm-section:last-child {
  border-bottom: none;
}
.tdm-section-title {
  font-size: 1.05rem;
  color: #ffb300;
  font-weight: 600;
  margin-bottom: 0.5em;
}
.tdm-section-content {
  color: #eee;
  font-size: 1rem;
  line-height: 1.5;
}

.tdm-skeleton {
  background: linear-gradient(90deg, #222 25%, #333 37%, #222 63%);
  background-size: 400% 100%;
  animation: tdm-skeleton 1.2s ease-in-out infinite;
  border-radius: 0.25em;
  min-height: 1.2em;
  width: 100%;
  margin-bottom: 0.5em;
}
@keyframes tdm-skeleton {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.tdm-lyrics {
  white-space: pre-line;
  font-family: inherit;
  font-size: 1rem;
  color: #ffecb3;
  background: #222;
  border-radius: 0.25em;
  padding: 0.7em 1em;
  margin: 0.5em 0 0 0;
  max-height: 300px;
  overflow-y: auto;
}

.tdm-links {
  display: flex;
  gap: 1.5em;
  margin-top: 0.5em;
  flex-wrap: wrap;
}
.tdm-link {
  color: #ffb300;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s;
}
.tdm-link:hover {
  color: #fff;
}

.tdm-preview-audio {
  margin-top: 0.5em;
  width: 100%;
  max-width: 320px;
}

.tdm-bio {
  color: #ffe082;
  font-size: 0.98rem;
  margin-top: 0.5em;
  max-height: 200px;
  overflow-y: auto;
}

.tdm-similar-list, .tdm-other-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em 1.2em;
  margin-top: 0.5em;
}
.tdm-similar-item, .tdm-other-item {
  color: #fff;
  background: #222;
  border-radius: 0.25em;
  padding: 0.3em 0.7em;
  font-size: 0.97em;
  cursor: pointer;
  transition: background 0.2s;
}
.tdm-similar-item:hover, .tdm-other-item:hover {
  background: #ffb30033;
  color: #ffb300;
}
