/* Telemetry Dashboard & Hall of Fame Styles */

.telemetry-section {
  padding: 3rem 0 5rem;
  background: linear-gradient(180deg, rgba(6, 8, 13, 0.4), rgba(12, 17, 26, 0.8) 50%, rgba(6, 8, 13, 0.4));
}

.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .telemetry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .telemetry-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Telemetry Card Base */
.telemetry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.telemetry-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.telemetry-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.telemetry-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.telemetry-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
}

.telemetry-icon-box img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

/* Stat Counters */
.stat-highlight-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-box {
  background: rgba(8, 11, 18, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.85rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-gold);
  line-height: 1.2;
}

.stat-value-cyan {
  color: var(--color-cyan);
}

.stat-value-emerald {
  color: var(--color-emerald);
}

.stat-value-ember {
  color: var(--color-ember-bright);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Telemetry List Items */
.telemetry-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex-grow: 1;
}

.telemetry-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  font-size: 0.85rem;
}

.telemetry-list-item span:first-child {
  color: var(--text-secondary);
}

.telemetry-list-item span:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

/**
 * Installed-mods rows — ONE list, both realms (src/components/ModList.js).
 *
 * Built out of .telemetry-list-item's look (same tint, border and radius) so
 * the Mods tab still reads as part of the dashboard, but as a grid rather than
 * a flex pair: art, then the name over the author's blurb in fine print, then
 * the version. The blurb is clamped to two lines and carries the full text as
 * a title — eighty-three manifest descriptions at full length would be a wall,
 * and truncation with no way to read the rest is its own kind of lie.
 */
.mod-rows {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mod-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.5rem 0.7rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}

/* The studio's own, marked down the edge rather than with another badge. */
.mod-row--studio {
  border-left: 2px solid rgba(251, 191, 36, 0.45);
}

a.mod-row {
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

a.mod-row:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--border-gold);
}

/* The initial shows through until the icon loads, and stays if it never does. */
.mod-row-icon {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(2, 6, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.mod-row-icon::before {
  content: attr(data-initial);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mod-row-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mod-row-main {
  min-width: 0;
}

.mod-row-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

a.mod-row:hover .mod-row-name {
  color: var(--color-amber-bright);
}

.mod-row-owner {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
}

.mod-row-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(251, 191, 36, 0.8);
}

.mod-row-blurb {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.1rem;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.mod-row-blurb--none {
  font-style: italic;
  opacity: 0.7;
}

.mod-row-side {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

/* Marks the exception: a mod Hexium does not carry, linked to Thunderstore. */
.mod-row-host {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.mod-row-update {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.mod-rows-divider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.85rem 0 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.mod-rows-divider:first-child {
  margin-top: 0.15rem;
}

.mod-rows-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

@media (max-width: 560px) {
  .mod-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
  }

  .mod-row-icon {
    width: 28px;
    height: 28px;
  }

  .mod-row-name {
    font-size: 0.8rem;
  }
}

/* Leaderboards Table */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.leaderboard-table th {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-card);
}

.leaderboard-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.leaderboard-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.rank-1 {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #000;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.rank-2 {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  color: #000;
  box-shadow: 0 0 8px rgba(226, 232, 240, 0.4);
}

.rank-3 {
  background: linear-gradient(135deg, #d97706, #92400e);
  color: #fff;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.4);
}
