/* ── Bot Profiles ─────────────────────────────────────────────────────── */

.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding: 16px;
}

.profile-card {
  background: var(--card-bg, #fff);
  border: 2px solid;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.profile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.profile-avatar {
  font-size: 2.5rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-info { flex: 1; }

.profile-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
}

.profile-owner {
  font-size: 0.85rem;
  color: var(--text-secondary, #666);
  margin-top: 2px;
}

.profile-wins {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f59e0b;
}

.profile-motto {
  padding: 8px 16px;
  font-style: italic;
  color: var(--text-secondary, #555);
  font-size: 0.95rem;
  border-top: 1px solid var(--border, #eee);
}

.profile-strategy {
  padding: 12px 16px;
  border-top: 1px solid var(--border, #eee);
}

.strategy-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #999);
  margin-bottom: 4px;
}

.strategy-text {
  font-size: 0.9rem;
  color: var(--text-primary, #333);
  line-height: 1.5;
}

.profile-meta {
  display: flex;
  gap: 12px;
  padding: 8px 16px;
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  border-top: 1px solid var(--border, #eee);
}

.meta-link { color: var(--link, #4ECDC4); text-decoration: none; }
.meta-link:hover { text-decoration: underline; }

.profile-endorsements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
}

.endorsement-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 0.8rem;
  background: var(--badge-bg, #f0f0f0);
  border-radius: 12px;
}

.profile-endorse {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--border, #eee);
}

.endorse-label {
  font-size: 0.75rem;
  color: var(--text-muted, #999);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.endorse-buttons {
  display: flex;
  gap: 4px;
}

.endorse-btn {
  background: none;
  border: 1px solid var(--border, #ddd);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.endorse-btn:hover {
  background: var(--hover-bg, #f0f0f0);
  transform: scale(1.15);
}

.endorse-btn.endorsed {
  background: var(--accent-bg, #e8f5e9);
  border-color: var(--accent, #4caf50);
}

/* ── Stats ────────────────────────────────────────────────────────────── */

.profiles-stats {
  display: flex;
  gap: 12px;
  padding: 16px;
  justify-content: center;
}

.stat-card {
  background: var(--card-bg, #f8f9fa);
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
  min-width: 100px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #333);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted, #999);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Empty State ──────────────────────────────────────────────────────── */

.profiles-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-secondary, #666);
}

.profiles-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.profiles-empty h3 { margin: 0 0 8px; color: var(--text-primary, #333); }
.profiles-empty p { margin: 0 0 16px; }

.profiles-cta code {
  display: inline-block;
  padding: 8px 16px;
  background: var(--code-bg, #f4f4f4);
  border-radius: 6px;
  font-size: 0.8rem;
  word-break: break-all;
}

/* ── Dark Mode ────────────────────────────────────────────────────────── */

.dark .profile-card { background: #1e1e1e; }
.dark .profile-name { color: #e0e0e0; }
.dark .profile-owner { color: #999; }
.dark .profile-motto { color: #aaa; border-color: #333; }
.dark .profile-strategy { border-color: #333; }
.dark .strategy-text { color: #ccc; }
.dark .profile-meta { border-color: #333; color: #777; }
.dark .endorsement-badge { background: #2a2a2a; }
.dark .profile-endorse { border-color: #333; }
.dark .endorse-btn { border-color: #444; }
.dark .endorse-btn:hover { background: #333; }
.dark .stat-card { background: #252525; }
.dark .stat-value { color: #e0e0e0; }
.dark .profiles-empty { color: #999; }
.dark .profiles-empty h3 { color: #e0e0e0; }
.dark .profiles-cta code { background: #2a2a2a; }

/* ── Mobile ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .profiles-grid { grid-template-columns: 1fr; padding: 8px; gap: 12px; }
  .profiles-stats { flex-wrap: wrap; }
  .stat-card { min-width: 80px; padding: 8px 12px; }
  .profile-avatar { font-size: 2rem; width: 44px; height: 44px; }
}
