/* public/css/stats.css */

/* --- Общие цифры вверху --- */
.stats-totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.stats-total-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stats-total-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--acid), transparent);
}

.stats-total-card__num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--acid);
  line-height: 1;
  margin-bottom: 6px;
}

.stats-total-card__label {
  font-size: 12px;
  color: var(--fg-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Сетка секций --- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 8px;
}

/* --- Секция --- */
.stats-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stats-section__title {
  font-size: 16px;
  margin-bottom: 14px;
  color: var(--fg-dim);
}

/* --- Список --- */
.stats-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-list__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 2px;
  transition: background 0.1s;
  text-decoration: none;
  color: inherit;
}

.stats-list__row:hover {
  background: var(--bg-soft);
}

.stats-list__rank {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-faint);
  min-width: 28px;
  font-weight: 700;
}

.stats-list__rank--gold   { color: #ffd700; }
.stats-list__rank--silver { color: #c0c0c0; }
.stats-list__rank--bronze { color: #cd7f32; }

.stats-list__name {
  flex: 1;
  font-size: 14px;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-list__value {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--acid);
  flex-shrink: 0;
}

/* --- Строка энергетика в топе --- */
.stats-drink-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}

.stats-drink-row:hover {
  border-color: var(--border-bright);
}

/* --- Мобильная адаптация --- */
@media (max-width: 640px) {
  .stats-totals {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-total-card__num {
    font-size: 26px;
  }
}

@media (max-width: 360px) {
  .stats-totals {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stats-total-card {
    padding: 12px 10px;
  }

  .stats-total-card__num {
    font-size: 22px;
  }
}
