/* ============================================================
   scrobbles.css — SCROBBLE HISTORY PAGE
   Linked from scrobbles.html after style.css
============================================================ */

/* ── Stats bar ───────────────────────────────────────────── */
.scrobStats {
  display: flex;
  background: rgba(0,0,0,0.55);
  border: 1px solid #440066;
  border-left: 3px solid #7a00aa;
  margin-bottom: 20px;
  overflow: hidden;
}

.scrobStatItem {
  padding: 14px 24px;
  border-right: 1px solid #2a0040;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.scrobStatItem:last-child { border-right: none; }

.scrobStatLabel {
  font-size: 9px;
  color: #443366;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.scrobStatValue {
  font-size: 22px;
  color: #d4c8ff;
  letter-spacing: 1px;
  text-shadow: 0 0 18px rgba(170,102,255,0.35);
}

/* ── Loading skeletons ───────────────────────────────────── */
.scrobLoadMsg {
  font-size: 11px;
  color: #5544aa;
  letter-spacing: 2px;
  margin-bottom: 14px;
  animation: scrobBlink 1.1s ease infinite;
}

@keyframes scrobBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.scrobSkeleton {
  height: 52px;
  border-bottom: 1px solid #180024;
  background: linear-gradient(
    90deg,
    rgba(30,0,50,0.55) 25%,
    rgba(70,0,110,0.28) 50%,
    rgba(30,0,50,0.55) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Empty state (no history synced yet) ────────────────── */
.scrobEmptyMsg {
  padding: 48px 20px;
  text-align: center;
  border: 1px solid #2a0040;
  background: rgba(0,0,0,0.4);
  margin-bottom: 20px;
}

.scrobEmptyIcon {
  font-size: 40px;
  color: #2a0040;
  margin-bottom: 18px;
}

.scrobEmptyTitle {
  font-size: 13px;
  color: #5544aa;
  letter-spacing: 3px;
  margin-bottom: 14px;
}

.scrobEmptyDetail {
  font-size: 11px;
  color: #3d2d5a;
  letter-spacing: 0.5px;
  line-height: 1.8;
  max-width: 460px;
  margin: 0 auto;
}

/* ── Error message ───────────────────────────────────────── */
.scrobErrorMsg {
  padding: 18px 20px;
  background: rgba(50,0,0,0.45);
  border: 1px solid #440000;
  border-left: 3px solid #880000;
  color: #ff6666;
  font-size: 12px;
  letter-spacing: 1.5px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.scrobErrorSub {
  color: #553333;
  font-size: 10px;
  margin-top: 6px;
  letter-spacing: 1px;
}

/* ── Search bar ──────────────────────────────────────────── */
.scrobSearchWrap {
  display: flex;
  margin-bottom: 16px;
  border: 1px solid #5500aa;
  background: rgba(0,0,0,0.5);
}

.scrobSearchInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #d4c8ff;
  font-family: 'OCR A Std', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 9px 14px;
}

.scrobSearchInput::placeholder { color: #33224a; }

.scrobSearchClear {
  background: none;
  border: none;
  border-left: 1px solid #440066;
  color: #5544aa;
  font-family: 'OCR A Std', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 9px 14px;
  cursor: pointer;
  transition: color 0.15s;
}

.scrobSearchClear:hover { color: #cc99ff; }

/* ── Controls bar (filter + sort) ───────────────────────── */
.scrobControls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.45);
  border: 1px solid #2a0040;
}

.scrobControlGroup {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scrobControlLabel {
  font-size: 9px;
  color: #3d2d6a;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-right: 2px;
}

.scrobFilterBtn {
  background: rgba(50,0,90,0.45);
  border: 1px solid #440066;
  color: #7755aa;
  font-family: 'OCR A Std', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 6px 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.scrobFilterBtn:hover {
  background: rgba(100,0,170,0.5);
  color: #cc99ff;
  border-color: #7700bb;
}

.scrobFilterBtn--active {
  background: rgba(100,0,170,0.6);
  border-color: #8800cc;
  color: #e0ccff;
  box-shadow: 0 0 8px rgba(130,0,210,0.3);
}

.scrobSortSelect {
  background: rgba(0,0,0,0.55);
  border: 1px solid #440066;
  color: #d4c8ff;
  font-family: 'OCR A Std', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 6px 10px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236644aa'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.scrobSortSelect:focus { border-color: #8800cc; }

.scrobSortSelect option {
  background: #0d0018;
  color: #d4c8ff;
}

/* ── Table ───────────────────────────────────────────────── */
#scrobWrap {
  border: 1px solid #2a0040;
  margin-bottom: 14px;
  overflow: hidden;
}

/* grid template shared by header + rows */
.scrobHeader,
.scrobRow {
  display: grid;
  grid-template-columns: 48px 1fr 138px 138px 114px 20px;
  align-items: center;
  padding: 0 10px;
}

.scrobHeader {
  padding-top: 8px;
  padding-bottom: 8px;
  background: rgba(35,0,60,0.95);
  border-bottom: 2px solid #440066;
  font-size: 9px;
  letter-spacing: 2.5px;
  color: #4a3870;
  user-select: none;
}

/* ── Track rows ──────────────────────────────────────────── */
.scrobRow {
  padding-top: 7px;
  padding-bottom: 7px;
  border-bottom: 1px solid #180024;
  min-height: 52px;
  transition: background 0.1s;
  position: relative;
}

.scrobRow:last-child { border-bottom: none; }

.scrobRow:nth-child(even) { background: rgba(20,0,35,0.3); }

.scrobRow:hover { background: rgba(80,0,130,0.2); }

.scrobRow:hover .scrobArtWrap {
  border-color: #7700bb;
  box-shadow: 0 0 10px rgba(130,0,210,0.35);
}

.scrobRow--loved { background: rgba(50,0,35,0.25); }
.scrobRow--loved:hover { background: rgba(80,0,60,0.28); }

.scrobRow--now {
  background: rgba(0,30,20,0.3);
}
.scrobRow--now:hover { background: rgba(0,50,30,0.3); }

/* ── Album art cell ──────────────────────────────────────── */
.scrobArtWrap {
  width: 38px;
  height: 38px;
  border: 1px solid #220033;
  background: #060010;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.1s, box-shadow 0.1s;
}

.scrobArt {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scrobArtWrap--missing::after {
  content: '♪';
  color: #2a003d;
  font-size: 18px;
}

/* ── Text cells ──────────────────────────────────────────── */
.scrobTrack {
  font-size: 12px;
  color: #d4c8ff;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 14px;
}

.scrobArtistName {
  font-size: 11px;
  color: #aa88ee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}

.scrobAlbumName {
  font-size: 10px;
  color: #6655aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}

.scrobDate {
  font-size: 10px;
  color: #3d2d6a;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ── "Now Playing" badge ─────────────────────────────────── */
.scrobNowBadge {
  font-size: 10px;
  color: #33ff88;
  letter-spacing: 1px;
  animation: scrobGlowGreen 2s ease infinite;
}

@keyframes scrobGlowGreen {
  0%, 100% { text-shadow: 0 0 6px #33ff88; }
  50%       { text-shadow: 0 0 16px #33ff88, 0 0 28px #00cc55; }
}

/* ── Loved heart ─────────────────────────────────────────── */
.scrobLovedHeart {
  font-size: 13px;
  color: #ee55cc;
  text-align: center;
  text-shadow: 0 0 7px rgba(238,85,200,0.5);
}

/* ── Pagination ──────────────────────────────────────────── */
#scrobPager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 18px 0;
}

.scrobPagerBtn {
  background: rgba(70,0,120,0.55);
  border: 1px solid #5500aa;
  color: #cc99ff;
  font-family: 'OCR A Std', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.scrobPagerBtn:hover:not(:disabled) {
  background: rgba(130,0,210,0.65);
  color: #fff;
  box-shadow: 0 0 8px rgba(130,0,210,0.3);
}

.scrobPagerBtn:disabled {
  opacity: 0.28;
  cursor: default;
}

.scrobPagerInfo {
  font-size: 11px;
  color: #5544aa;
  letter-spacing: 1.5px;
  min-width: 120px;
  text-align: center;
}

/* jump-to-page */
.scrobJumpWrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.scrobJumpLabel {
  font-size: 9px;
  color: #3d2d6a;
  letter-spacing: 1.5px;
}

.scrobJumpInput {
  width: 50px;
  background: rgba(0,0,0,0.65);
  border: 1px solid #440066;
  color: #d4c8ff;
  font-family: 'OCR A Std', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 6px 8px;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}

.scrobJumpInput:focus { border-color: #8800cc; }
