/* unplucked-gems.html page styles (extracted v4.2) */
header {
  text-align: center;
  padding: 48px 24px 32px;
  border-bottom: 1px solid var(--border);
}
header h1 {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.header-desc {
  font-size: 0.82rem;
  color: var(--muted2);
  max-width: 520px;
  margin: 0 auto 16px;
}
/* STATS - page-specific overrides */
.stat-num { transition: opacity 0.3s ease; }
.stat-num.updating { opacity: 0.3; }
.stats-context {
  text-align: center;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
  margin-top: 8px;
  min-height: 1.2em;
  transition: opacity 0.3s ease;
}

/* CREDIT */
.credit {
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted2);
  padding: 16px 16px 0;
  max-width: 600px;
  margin: 0 auto;
}

/* ALBUM GRID */
.album-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  perspective: 1000px;
}
@media (max-width: 768px) {
  .album-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .album-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* FLIP CARD GRID ITEM */
.flip-card {
  cursor: pointer;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.flip-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 10px;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

/* FRONT FACE */
.flip-card-front {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-card-front img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s ease, transform 0.2s ease;
  display: block;
}
.flip-card:not(.flipped):hover .flip-card-front img {
  border-color: rgba(204, 162, 60, 0.5);
  transform: scale(1.03);
}
.flip-card-label {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted2);
  margin-top: 6px;
  line-height: 1.3;
  transition: color 0.2s ease;
}
.flip-card:not(.flipped):hover .flip-card-label {
  color: var(--gold);
}
.flip-card-count {
  text-align: center;
  font-size: 0.58rem;
  color: var(--muted2);
  opacity: 0.6;
  margin-top: 2px;
}

/* BACK FACE - hidden placeholder to preserve 3D flip illusion */
.flip-card-back-placeholder {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(180deg);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flip-card-back-placeholder span {
  font-size: 0.7rem;
  color: var(--muted2);
}

/* EXPANDED PANEL - positioned as overlay near card */
.expanded-panel {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(700px, 92vw);
  max-height: 85vh;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  z-index: 200;
  padding: 20px;
  overflow: hidden;
  animation: panelIn 0.35s ease;
}
.expanded-panel.active {
  display: flex;
}
@keyframes panelIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.92) rotateY(-8deg); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotateY(0deg); }
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.panel-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.panel-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  flex-shrink: 0;
  font-family: 'Poppins', sans-serif;
  line-height: 1;
}
.panel-close:hover {
  background: var(--red);
  color: #fff;
}

/* PANEL CONTROLS */
.panel-controls {
  margin-bottom: 12px;
  flex-shrink: 0;
}
.panel-search {
  width: 100%;
  padding: 10px 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  font-family: 'Poppins', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.panel-search:focus { border-color: #fff; }
.panel-search::placeholder { color: var(--muted2); }

.panel-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.filter-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--muted2);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}
.filter-btn:hover { border-color: var(--red); color: var(--text); }
.filter-btn.active { background: var(--red); border-color: var(--red); color: #fff; }

/* PANEL SESSIONS */
.panel-sessions {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-scroll) transparent;
}
.panel-sessions::-webkit-scrollbar { width: 6px; }
.panel-sessions::-webkit-scrollbar-track { background: transparent; }
.panel-sessions::-webkit-scrollbar-thumb { background: #3a1080; border-radius: 3px; }

.panel-no-results {
  text-align: center;
  padding: 24px 8px;
  color: var(--muted2);
  font-size: 0.82rem;
}

/* SESSION CARD */
.session-card {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.18s ease;
  cursor: pointer;
}
.session-card:hover {
  border-color: rgba(200, 16, 46, 0.4);
  background: rgba(200, 16, 46, 0.04);
}
.session-card.expanded {
  border-color: rgba(200, 16, 46, 0.3);
  background: rgba(200, 16, 46, 0.06);
}
.session-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.session-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.session-alt {
  font-size: 0.72rem;
  color: var(--muted2);
  font-weight: 400;
  font-style: italic;
}
.tier-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.tier-holy-grail { background: #D4A017; color: #000; }
.tier-standout { background: rgba(200, 16, 46, 0.8); color: #fff; }
.tier-notable { background: rgba(255, 255, 255, 0.15); color: var(--text); }

.session-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.tag {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 8px;
}
.tag-type { background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.tag-full { background: rgba(29, 185, 84, 0.2); color: #1DB954; }
.tag-confirmed { background: rgba(255, 255, 255, 0.06); color: var(--muted2); }
.tag-partial { background: rgba(204, 162, 60, 0.2); color: var(--gold); }
.tag-snippet { background: rgba(204, 162, 60, 0.15); color: var(--gold); }
.tag-rumored { background: rgba(200, 16, 46, 0.15); color: #e66; }
.tag-quality-lossless { background: rgba(29, 185, 84, 0.15); color: #1DB954; }
.tag-quality-cd { background: rgba(29, 185, 84, 0.1); color: #59c76e; }
.tag-quality-high { background: rgba(100, 180, 255, 0.12); color: #7ab8f5; }
.tag-quality-low { background: rgba(255, 200, 100, 0.1); color: #c9a74e; }
.tag-link { background: rgba(200, 16, 46, 0.2); color: var(--red); cursor: pointer; text-decoration: none; }
.tag-link:hover { background: var(--red); color: #fff; }

.session-notes {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
}
.session-card.expanded .session-notes { display: block; }

/* OVERLAY */
.grid-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(14, 11, 22, 0.75);
  z-index: 150;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.grid-overlay.active { display: block; }

@media (max-width: 480px) {
  .session-card { padding: 12px 14px; }
  .flip-card-label { font-size: 0.6rem; }
  .expanded-panel { padding: 14px; }
}
