html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.game-tile {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s;
  cursor: pointer;
}

.game-tile:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.game-tile__icon {
  aspect-ratio: 1;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.game-tile__name {
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.3;
  color: #212529;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Stat cards ── */
.stat-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  text-align: center;
}

.stat-card__value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: #212529;
}

.stat-card__label {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* ── Section title ── */
.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #212529;
  border-left: 3px solid #0d6efd;
  padding-left: 0.6rem;
}

/* ── Avatars ── */
.avatar-sm {
  width: 36px;
  height: 36px;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-xs {
  width: 22px;
  height: 22px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Leaderboard ── */
.leaderboard {
  border: 1px solid #dee2e6;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.leaderboard__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid #f0f0f0;
}

.leaderboard__row:last-child {
  border-bottom: none;
}

.leaderboard__rank {
  width: 1.5rem;
  font-size: 0.8rem;
  text-align: center;
  flex-shrink: 0;
}

.leaderboard__name {
  font-size: 0.875rem;
}

.leaderboard__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.leaderboard__stats {
  flex-shrink: 0;
}

/* Tier badges */
.tier-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1em 0.45em;
  border-radius: 4px;
  color: #fff;
}

.tier-1 { background: #cd7f32; }
.tier-2 { background: #9e9e9e; }
.tier-3 { background: #c8a400; }
.tier-4 { background: #4a90d9; }
.tier-5 { background: #7b4bb8; }

/* Trophy colored dots */
.trophy-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.trophy-platinum { background: #00b2ff; }
.trophy-gold     { background: #ffd700; }
.trophy-silver   { background: #a8a9ad; }
.trophy-bronze   { background: #cd7f32; }

/* ── Activity feed ── */
.activity-feed {
  border: 1px solid #dee2e6;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  max-height: 480px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid #f0f0f0;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item__trophy-icon {
  width: 40px;
  height: 40px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f5f5f5;
}

.activity-item__trophy-name {
  font-size: 0.875rem;
}

.activity-item__game {
  font-size: 0.78rem;
}

/* ── Game link hover ── */
.game-link:hover { text-decoration: underline !important; }

/* ── Trophy group ── */
.trophy-group__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: #f8f9fa;
  border-left: 3px solid;
}

.trophy-group__header--platinum { border-left-color: #00b2ff; color: #0072a3; }
.trophy-group__header--gold     { border-left-color: #ffd700; color: #7a6500; }
.trophy-group__header--silver   { border-left-color: #a8a9ad; color: #555; }
.trophy-group__header--bronze   { border-left-color: #cd7f32; color: #7a4a10; }

.trophy-group__count {
  margin-left: auto;
  background: #dee2e6;
  border-radius: 10px;
  padding: 0.05em 0.55em;
  font-size: 0.75rem;
  font-weight: 700;
  color: #495057;
}

/* ── Trophy list ── */
.trophy-list {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.trophy-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

.trophy-row:last-child { border-bottom: none; }
.trophy-row:hover { background: #f8f9fa; }

.trophy-row__icon {
  width: 48px;
  height: 48px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e9ecef;
}

.trophy-row__icon--empty {
  background: #e9ecef;
}

.trophy-row__body {
  flex: 1;
  overflow: hidden;
}

.trophy-row__body .fw-semibold {
  font-size: 0.9rem;
}

.trophy-row__meta {
  text-align: right;
  flex-shrink: 0;
  min-width: 7rem;
}

.trophy-row__rate {
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.2rem;
}

/* Rarity badges */
.rare-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15em 0.55em;
  border-radius: 4px;
}

.rare-ultra  { background: #e8d5ff; color: #5a189a; }
.rare-very   { background: #d0e8ff; color: #0056b3; }
.rare-rare   { background: #d4edda; color: #155724; }
.rare-common { background: #f0f0f0; color: #6c757d; }

/* ── Form helpers (keep existing) ── */
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}