/* Telemetry Dashboard & Hall of Fame Styles */

.telemetry-section {
  padding: 3rem 0 5rem;
  background: linear-gradient(180deg, rgba(11, 8, 5, 0.4), rgba(22, 16, 10, 0.8) 50%, rgba(11, 8, 5, 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: a plaque — dark wood, four brass rivets, a thread of gold along the top. */
.telemetry-card {
  background:
    var(--rivets),
    var(--grain),
    linear-gradient(180deg, rgba(40, 28, 17, 0.92), rgba(23, 15, 9, 0.96));
  border: 1px solid var(--border-card);
  border-radius: 3px;
  padding: 1.5rem 1.6rem 1.4rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 180, 0.07),
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    0 8px 18px -8px rgba(0, 0, 0, 0.75);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}
.telemetry-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(207, 165, 69, 0.7) 50%, transparent);
  pointer-events: none;
}

.telemetry-card:hover {
  border-color: rgba(232, 194, 90, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 180, 0.1),
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    0 12px 24px -8px rgba(0, 0, 0, 0.85),
    0 0 20px rgba(207, 165, 69, 0.12);
}

.telemetry-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(207, 165, 69, 0.25);
}

.telemetry-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--parch-100);
  text-shadow: 0 1px 0 #000;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.telemetry-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 236, 190, 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 {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.55);
  background: rgba(8, 5, 3, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  padding: 0.85rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  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, 236, 190, 0.02);
  border: 1px solid rgba(255, 236, 190, 0.04);
  border-radius: 3px;
  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, 236, 190, 0.02);
  border: 1px solid rgba(255, 236, 190, 0.04);
  border-radius: 3px;
  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(232, 194, 90, 0.45);
}

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

a.mod-row:hover {
  background: rgba(255, 236, 190, 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: 3px;
  background: rgba(10, 7, 4, 0.7);
  border: 1px solid rgba(255, 236, 190, 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 {
  margin-left: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(232, 194, 90, 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: 2px;
  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, 236, 190, 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, #e8c25a, #a8812f);
  color: #000;
  box-shadow: 0 0 10px rgba(232, 194, 90, 0.5);
}

.rank-2 {
  background: linear-gradient(135deg, #e0d3b4, #a99a78);
  color: #000;
  box-shadow: 0 0 8px rgba(224, 211, 180, 0.4);
}

.rank-3 {
  background: linear-gradient(135deg, #a8812f, #6b5226);
  color: #fff;
  box-shadow: 0 0 8px rgba(168, 129, 47, 0.4);
}

/* ---------------------------------------------------------------------------
 * Proxima Maxi: Telemetry, Mods & Leaderboard Styles
 * ------------------------------------------------------------------------- */
[data-realm="proximamaxi"] .telemetry-section {
  background: linear-gradient(180deg, rgba(6, 4, 10, 0.4), rgba(18, 11, 28, 0.8) 50%, rgba(6, 4, 10, 0.4));
}

[data-realm="proximamaxi"] .telemetry-card {
  background:
    var(--rivets),
    var(--grain),
    linear-gradient(180deg, rgba(22, 13, 36, 0.94), rgba(10, 6, 18, 0.98));
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(239, 68, 68, 0.2),
    inset 0 0 0 1px rgba(0, 0, 0, 0.65),
    0 8px 22px -8px rgba(0, 0, 0, 0.9);
}

[data-realm="proximamaxi"] .telemetry-card::before {
  background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.85) 50%, transparent);
}

[data-realm="proximamaxi"] .telemetry-card:hover {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(248, 113, 113, 0.25),
    inset 0 0 0 1px rgba(0, 0, 0, 0.7),
    0 14px 28px -8px rgba(0, 0, 0, 0.95),
    0 0 24px rgba(239, 68, 68, 0.25),
    0 0 34px rgba(168, 85, 247, 0.2);
}

[data-realm="proximamaxi"] .telemetry-card-header {
  border-bottom: 1px solid rgba(168, 85, 247, 0.3);
}

[data-realm="proximamaxi"] .telemetry-icon-box {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
}

[data-realm="proximamaxi"] .stat-box {
  background: rgba(10, 5, 18, 0.8);
  border-color: rgba(168, 85, 247, 0.2);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.75);
}

[data-realm="proximamaxi"] .stat-value {
  color: #d8b4fe;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.45);
}

[data-realm="proximamaxi"] .stat-value-cyan {
  color: #ff8b8b;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}

[data-realm="proximamaxi"] .stat-value-emerald {
  color: #a7f3d0;
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}

[data-realm="proximamaxi"] .stat-value-ember {
  color: #ef4444;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

[data-realm="proximamaxi"] .telemetry-list-item {
  background: rgba(168, 85, 247, 0.04);
  border-color: rgba(168, 85, 247, 0.1);
}

[data-realm="proximamaxi"] .telemetry-list-item span:first-child {
  color: #ddd6fe;
}

[data-realm="proximamaxi"] .telemetry-list-item span:last-child {
  color: #f6f3ff;
}

/* Mod List Rows in Proxima Maxi */
[data-realm="proximamaxi"] .mod-row {
  background: rgba(168, 85, 247, 0.045);
  border-color: rgba(168, 85, 247, 0.14);
}

[data-realm="proximamaxi"] .mod-row--studio {
  border-left: 2px solid #ef4444;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(168, 85, 247, 0.04) 100%);
}

[data-realm="proximamaxi"] a.mod-row:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
}

[data-realm="proximamaxi"] a.mod-row:hover .mod-row-name {
  color: #fca5a5;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

[data-realm="proximamaxi"] .mod-row-icon {
  background: rgba(16, 9, 27, 0.85);
  border-color: rgba(168, 85, 247, 0.25);
}

[data-realm="proximamaxi"] .mod-row-owner {
  color: #c084fc;
}

[data-realm="proximamaxi"] .mod-row-tag {
  color: #f87171;
}

[data-realm="proximamaxi"] .mod-row-host {
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.1);
}

[data-realm="proximamaxi"] .mod-row-update {
  color: #fca5a5;
}

[data-realm="proximamaxi"] .mod-rows-divider {
  color: #c084fc;
}

[data-realm="proximamaxi"] .mod-rows-divider::after {
  background: rgba(168, 85, 247, 0.3);
}

/* Leaderboards in Proxima Maxi */
[data-realm="proximamaxi"] .leaderboard-table th {
  color: #d8b4fe;
  border-bottom-color: rgba(168, 85, 247, 0.35);
}

[data-realm="proximamaxi"] .leaderboard-table td {
  border-bottom-color: rgba(168, 85, 247, 0.12);
  color: #ddd6fe;
}

[data-realm="proximamaxi"] .leaderboard-table tr:hover td {
  background: rgba(239, 68, 68, 0.08);
  color: #ffffff;
}

[data-realm="proximamaxi"] .rank-1 {
  background: linear-gradient(135deg, #ef4444, #881337);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.8);
}

[data-realm="proximamaxi"] .rank-2 {
  background: linear-gradient(135deg, #c084fc, #581c87);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.7);
}

[data-realm="proximamaxi"] .rank-3 {
  background: linear-gradient(135deg, #71717a, #27272a);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(113, 113, 122, 0.5);
}

/* ---------------------------------------------------------------------------
 * Wonderland / 3rd Realm: Telemetry & Mods Styles
 * ------------------------------------------------------------------------- */
[data-realm="scoop"] .telemetry-card {
  background:
    var(--rivets),
    var(--grain),
    linear-gradient(180deg, rgba(10, 28, 46, 0.94), rgba(4, 15, 25, 0.98));
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: inset 0 1px 0 rgba(56, 189, 248, 0.2), 0 8px 22px -8px rgba(0, 0, 0, 0.9);
}

[data-realm="scoop"] .telemetry-card::before {
  background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.85) 50%, transparent);
}

[data-realm="scoop"] .mod-row {
  background: rgba(56, 189, 248, 0.04);
  border-color: rgba(56, 189, 248, 0.12);
}

[data-realm="scoop"] .mod-row--studio {
  border-left: 2px solid #34d399;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.08), rgba(56, 189, 248, 0.04));
}

[data-realm="scoop"] .stat-value {
  color: #7dd3fc;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

[data-realm="scoop"] .rank-1 {
  background: linear-gradient(135deg, #38bdf8, #0369a1);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
}
