/* ================================================================
   lastfm.css — Last.fm / Now Playing widget
   Used by index.html
================================================================ */

/* ── Outer panel ──────────────────────────────────────────────── */
.lfmPanel {
  background: rgba(0,0,0,0.45);
  border: 1px solid #440066;
  border-top: 2px solid #7a00aa;
  margin-bottom: 20px;
}

/* ── Now Playing card ─────────────────────────────────────────── */
.lfmNowPlayingCard {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #2a0040;
}

.lfmArtwork {
  width: 100px;
  height: 100px;
  min-width: 100px;
  object-fit: cover;
  border: 1px solid #330044;
  display: block;
  image-rendering: auto;
}

.lfmArtworkPlaceholder {
  width: 100px;
  height: 100px;
  min-width: 100px;
  background: rgba(30,0,50,0.8);
  border: 1px solid #330044;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #330044;
}

.lfmNowInfo {
  flex: 1;
  min-width: 0;
}

.lfmStatusBadge {
  font-size: 9px;
  letter-spacing: 2px;
  padding: 2px 8px;
  border: 1px solid #330044;
  color: #5544aa;
  background: rgba(20,0,40,0.6);
  display: inline-block;
  margin-bottom: 8px;
}

.lfmStatusBadge.lfmLive {
  color: #33ff88;
  border-color: #006633;
  background: rgba(0,30,15,0.6);
  animation: lfmLivePulse 2s ease-in-out infinite;
}

@keyframes lfmLivePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(51,255,136,0); }
  50%       { box-shadow: 0 0 0 3px rgba(51,255,136,0.15); }
}

.lfmStatusBadge.lfmRecent {
  color: #8866bb;
  border-color: #440066;
}

.lfmTrackName {
  font-size: 15px;
  color: #d4c8ff;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lfmArtistName {
  font-size: 12px;
  color: #cc99ff;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lfmAlbumName {
  font-size: 11px;
  color: #6644aa;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 10px;
}

.lfmLastfmLink {
  font-size: 9px;
  color: #5544aa;
  letter-spacing: 1.5px;
  text-decoration: none;
  border-bottom: 1px solid #330044;
  transition: color 0.2s, border-color 0.2s;
}

.lfmLastfmLink:hover {
  color: #cc99ff;
  border-color: #7a00aa;
}

.lfmScrobblesBlock {
  text-align: right;
  min-width: 90px;
}

.lfmScrobblesLabel {
  font-size: 8px;
  color: #443366;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.lfmScrobblesVal {
  font-size: 18px;
  color: #9966cc;
  letter-spacing: 1px;
}

/* ── Sub-panel header ─────────────────────────────────────────── */
.lfmSubPanel {
  border-top: 1px solid #2a0040;
  /* As a grid item: allow shrinking below content min-width so the
     nowrap track names ellipsize instead of widening the page. */
  min-width: 0;
}

.lfmSubHead {
  font-size: 9px;
  color: #7744aa;
  letter-spacing: 2.5px;
  padding: 7px 14px;
  background: rgba(30,0,50,0.3);
  border-bottom: 1px solid #1e0030;
}

/* ── Two-column grid (top artists + top tracks) ───────────────── */
.lfmGridTwo {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.lfmGridTwo .lfmSubPanel:first-child {
  border-right: 1px solid #2a0040;
}

@media (max-width: 600px) {
  .lfmGridTwo { grid-template-columns: 1fr; }
  .lfmGridTwo .lfmSubPanel:first-child { border-right: none; }
}

/* ── Rank rows ────────────────────────────────────────────────── */
.lfmRow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-bottom: 1px solid #150020;
  transition: background 0.15s;
}

.lfmRow:last-child { border-bottom: none; }

.lfmRow:hover { background: rgba(80,0,120,0.15); }

.lfmRowNum {
  font-size: 10px;
  color: #440066;
  min-width: 14px;
  text-align: right;
}

.lfmRowName {
  flex: 1;
  font-size: 11px;
  color: #b8adcc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.lfmRowSub {
  font-size: 10px;
  color: #5544aa;
}

.lfmRowCount {
  font-size: 10px;
  color: #6644aa;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.lfmRowAlbumArt {
  width: 28px;
  height: 28px;
  min-width: 28px;
  object-fit: cover;
  border: 1px solid #220033;
  display: block;
}

/* ── Recent tracks ────────────────────────────────────────────── */
.lfmRecentRow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-bottom: 1px solid #150020;
  transition: background 0.15s;
}

.lfmRecentRow:last-child { border-bottom: none; }

.lfmRecentRow:hover { background: rgba(80,0,120,0.15); }

.lfmRecentRow.lfmRecentLive {
  background: rgba(0,40,20,0.25);
}

.lfmRecentArt {
  width: 32px;
  height: 32px;
  min-width: 32px;
  object-fit: cover;
  border: 1px solid #220033;
  display: block;
}

.lfmRecentArtPlaceholder {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: rgba(30,0,50,0.6);
  border: 1px solid #220033;
}

.lfmRecentInfo {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lfmRecentTrack {
  font-size: 11px;
  color: #c4b8e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lfmRecentArtistName {
  font-size: 10px;
  color: #6644aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lfmRecentTime {
  font-size: 9px;
  color: #443366;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.lfmRecentNow {
  font-size: 9px;
  color: #33ff88;
  letter-spacing: 1px;
  white-space: nowrap;
  text-shadow: 0 0 6px #33ff88;
}

#lfmArtwork { display: none; }
