/* ============================================================
   scientek-charts.css — Sales Charts Section
============================================================ */

.charts-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.chart-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 1.4rem;
}

.chart-box-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e8b84b;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.chart-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

/* Card style — cover on top, text below */
.chart-row {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
}
.chart-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(123,79,255,0.18);
  border-color: rgba(232,184,75,0.25);
}

.chart-thumb {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  flex-shrink: 0;
}
.chart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chart-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* Position number badge */
.chart-pos {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  z-index: 2;
}
.chart-pos.gold   { background: #e8b84b; color: #1a1a28; }
.chart-pos.silver { background: #aaa;    color: #1a1a28; }
.chart-pos.bronze { background: #cd7f32; color: #fff; }

/* Movement indicator (up/down/new/steady) */
.chart-move {
  flex-shrink: 0;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.06);
  white-space: nowrap;
}
.chart-move-new    { color: #e8b84b; border: 1px solid #e8b84b; }
.chart-move-up     { color: #2ed573; border: 1px solid rgba(46,213,115,0.4); }
.chart-move-down   { color: #ff4757; border: 1px solid rgba(255,71,87,0.4); }
.chart-move-steady { background: rgba(232,184,75,0.16); color: #e8b84b; border: 1px solid #e8b84b; }

/* Streak badge (Hot/Champion/Legend) — sits beside the movement indicator,
   only ever shown on the current #1 entry */
.chart-streak {
  flex-shrink: 0;
  font-size: 0.85rem;
  line-height: 1;
  cursor: default;
}
.chart-streak-hot      { filter: drop-shadow(0 0 4px rgba(255,107,53,0.5)); }
.chart-streak-champion { filter: drop-shadow(0 0 4px rgba(232,184,75,0.5)); }
.chart-streak-legend   { filter: drop-shadow(0 0 5px rgba(186,156,255,0.6)); }

/* Certification badge (Gold/Platinum/Diamond) — lifetime units sold.
   Shared class names also used on music grid cards (see main stylesheet). */
.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.cert-badge-gold     { background: rgba(232,184,75,0.16); color: #e8b84b; border: 1px solid #e8b84b; }
.cert-badge-platinum { background: rgba(229,228,226,0.14); color: #e5e4e2; border: 1px solid rgba(229,228,226,0.5); }
.cert-badge-diamond  { background: rgba(185,242,255,0.14); color: #b9f2ff; border: 1px solid rgba(185,242,255,0.5); }

.chart-cert-row {
  margin-bottom: 6px;
}

.chart-info {
  padding: 0.7rem 0.8rem 0.8rem;
}
.chart-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2px;
}
.chart-title {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.chart-artist {
  font-size: 0.75rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}
.chart-bar-wrap {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.chart-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
  min-width: 4px;
}

.chart-empty {
  color: #555;
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem 0;
  grid-column: 1 / -1;
}

/* ---- Genre Tabs ---- */
.chart-genre-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.chart-genre-tab {
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #aaa;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.chart-genre-tab:hover { border-color: #e8b84b; color: #e8b84b; }
.chart-genre-tab.active { background: #e8b84b; border-color: #e8b84b; color: #1a1a28; }

@media (max-width: 600px) {
  .chart-list { grid-template-columns: repeat(2, 1fr); }
}

