:root {
  --bar-color: #2f70bb;
  --accent-color: #9a8cff;
  --accent-hover: #d8cfff;
  --bg-dark: #121212;
  --bg-panel: #1e1e2e;
  --bg-track: #2a2a3a;
  --bg-track-hover: #3a3a4a;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,1px,1px);
  white-space: nowrap; border: 0;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: #d1d1e0;
  text-align: center;
  line-height: 1.6;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 1rem;
  background: var(--accent-color);
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 9999;
}

.logo {
  width: 500px;
  max-width: 90%;
  height: auto;
  margin-bottom: 10px;
  filter: brightness(0.9) contrast(1.1);
}

header {
  background-color: #0f0f1a;
  color: #f0f0ff;
  padding: 40px 20px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

header h1 { margin: 0; font-size: 2.5em; }
.subtitle { font-size: 1.2em; margin-top: 10px; color: #ccc; }

main { max-width: 900px; margin: auto; padding: 20px; }

/* Albums grid */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 250px); 
  justify-content: center;                          
  gap: 16px;
  margin: 10px 0 30px;
}

.album-card {
  background: var(--bg-panel);
  border: 2px solid #2e2e3e;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
  /* width is controlled by the grid column size (250px) */
}

.album-card:hover { transform: translateY(-2px); background: #222236; }

.album-cover {
  width: 100%;                 
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: #252535;
}

.album-title {
  margin: 10px 0 0;
  font-weight: 700;
  font-size: 1rem;
  color: #e6e6f2;
}

/* Player / playlist */
#player-section {
  background: var(--bg-panel);
  border: 2px solid #2e2e3e;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.back-btn {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid #444;
  border-radius: 6px;
  color: #d1d1e0;
  cursor: pointer;
}
.back-btn:hover { background: #222236; }

audio { width: 100%; margin-bottom: 10px; }

#visualizer {
  width: 100%; height: 100px;
  background-color: #252535;
  border-radius: 8px;
  margin-bottom: 20px;
}

#nowPlaying { font-weight: bold; margin-bottom: 10px; color: #ccc; }

#playlistLabel {
  font-weight: bold; margin: 10px 0; color: #aaa;
  font-size: clamp(1.2rem, 2vw, 2rem);
}

.track {
  padding: 12px; margin-bottom: 8px;
  background: var(--bg-track);
  border-radius: 8px; cursor: pointer;
  transition: background 0.3s;
}
.track:hover, .track:focus-within { background: var(--bg-track-hover); }
.track.playing { background: #1c1f26; color: #fff; font-weight: bold; }

.track-meta {
  display: none; margin-top: 10px; font-size: 0.9em; text-align: left;
  color: #ccc; padding: 12px 16px; border-radius: 8px; border: 1px solid #444;
}
.track.open .track-meta { display: block; }

#about {
  background: var(--bg-panel);
  border: 2px solid #2e2e3e;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  color: #ccc;
}

a { color: var(--accent-color); }
a:hover { color: var(--accent-hover); }

/* Lyrics panel */
.lyrics-panel {
  position: fixed; top: 0; right: -100%;
  width: 50%; max-height: 100vh; box-sizing: border-box;
  background-color: #0f0f1a; color: #f0f0ff;
  box-shadow: -5px 0 15px rgba(0,0,0,0.6);
  padding: 30px 20px; z-index: 1000; overflow-y: auto;
  transition: right 0.4s ease-in-out;
}
.lyrics-panel.open { right: 0; }
.lyrics-panel h2 {
  margin-top: 0; font-size: 1.8rem; color: var(--accent-color);
  border-bottom: 1px solid #333; padding-bottom: 10px;
}
#lyricsContent {
  margin-top: 20px; white-space: pre-wrap; line-height: 1.6;
  color: #ddd; font-size: 1rem; padding-bottom: 100px;
}
.close-btn {
  position: absolute; top: 10px; left: 10px;
  background: none; border: none; font-size: 1.5rem; color: #ccc;
  cursor: pointer; z-index: 1001;
}
.close-btn:hover { color: #fff; }

/* Lyrics button */
.lyrics-btn {
  margin-top: 10px; padding: 6px 12px; background: var(--bar-color);
  color: #fff; border: none; cursor: pointer; border-radius: 5px; font-size: 0.9rem;
  transition: background 0.2s;
}
.lyrics-btn:hover { background: #21538a; }

/* Mobile */
@media (max-width: 768px) {
  .lyrics-panel { width: 90%; }
  #player-section { padding: 15px; }
}

/* Album Extras row */
.album-extras {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.album-extra-card {
  background: var(--bg-panel);
  border: 2px solid #2e2e3e;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
  max-width: 200px;
  flex: 1 1 150px;
}
.album-extra-card:hover {
  transform: translateY(-2px);
  background: #222236;
}
.album-extra-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}
.album-extra-card span {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #e6e6f2;
  font-weight: 700;
}

/* Lightbox modal */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox-body {
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
  background: var(--bg-panel);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
.lightbox-body img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2001;
}
.lightbox-close:hover {
  color: var(--accent-color);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .album-extras {
    flex-direction: column;
    align-items: center;
  }
  .album-extra-card {
    max-width: 90%;
  }
}

/* Lightbox adjustments for HTML content */
.lightbox-body.html-content {
  background: var(--bg-panel);
  color: #ddd;
  padding: 30px;
  border-radius: 8px;
  max-width: 900px;
  width: 90%;
  overflow-y: auto;
  text-align: left;
  line-height: 1.6;
}

.lightbox-body.html-content h1,
.lightbox-body.html-content h2,
.lightbox-body.html-content h3 {
  color: var(--accent-color);
  margin-top: 0;
}

.lightbox-body.html-content p {
  margin-bottom: 1rem;
}

.lightbox-body.html-content ul {
  padding-left: 20px;
  list-style: disc;
}

.lightbox-body.html-content li {
  margin-bottom: 0.5rem;
}

/* ===== Plyr theming + metadata strip ===== */
:root {
  --plyr-color-main: var(--accent-color, #9a8cff);
  --plyr-audio-controls-background: var(--bg-panel, #1e1e2e);
  --plyr-audio-control-color: #ffffff;
  --plyr-control-icon-size: 18px;
}

.player-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-panel, #1e1e2e);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 10px 0;
}
.player-meta__cover {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}
.player-meta__text { line-height: 1.2; }
.player-meta__title { font-weight: 600; color: #fff; }
.player-meta__sub   { font-size: .9rem; color: #c9d1d9; opacity: .9; }
.player-meta__cover[hidden]{display:none;}

.copyright {
  text-align: center;
  font-size: 0.8em;
  color: #aaa;
  margin: 40px 0 20px;
  line-height: 1.6;
  letter-spacing: 0.3px;
}