/* ── Prestige Profiles — Season History & Agent Cards ──────────────── */

.prestige-container {
  padding: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.prestige-section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e7eb;
}

.dark .prestige-section-title {
  border-bottom-color: #374151;
}

.prestige-empty {
  text-align: center;
  padding: 24px;
  color: #9ca3af;
  font-style: italic;
}

/* ── Prestige Leaderboard ─────────────────────────────────────────── */

.prestige-podium {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.prestige-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  min-width: 160px;
  flex: 1;
  max-width: 220px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.prestige-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--agent-color, #6b7280);
}

.prestige-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.dark .prestige-card {
  background: #1f2937;
  border-color: #374151;
}

.dark .prestige-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.prestige-rank {
  font-size: 28px;
  margin-bottom: 4px;
}

.prestige-avatar {
  font-size: 40px;
  margin: 4px 0;
}

.prestige-name {
  font-size: 16px;
  font-weight: 700;
  margin: 4px 0;
  color: var(--agent-color, #1f2937);
}

.dark .prestige-name {
  color: var(--agent-color, #e5e7eb);
}

.prestige-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin: 6px 0;
}

.prestige-points {
  font-size: 22px;
  font-weight: 800;
  color: var(--tier-color, #1f2937);
  margin: 6px 0 2px;
}

.prestige-seasons {
  font-size: 12px;
  color: #9ca3af;
}

/* ── Season History ───────────────────────────────────────────────── */

.season-current-banner {
  background: linear-gradient(135deg, #ef444410, #f9731610);
  border: 2px solid #ef444440;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}

.dark .season-current-banner {
  background: linear-gradient(135deg, #ef444420, #f9731620);
}

.season-current-label {
  font-size: 16px;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 10px;
  animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.season-progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.dark .season-progress-bar {
  background: #374151;
}

.season-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 4px;
  transition: width 1s ease;
}

.season-progress-text {
  font-size: 12px;
  color: #6b7280;
}

.season-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.season-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  border-left: 4px solid var(--winner-color, #6b7280);
}

.dark .season-card {
  background: #1f2937;
  border-color: #374151;
}

.season-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.season-number {
  font-size: 15px;
  font-weight: 700;
}

.season-duration {
  font-size: 12px;
  color: #9ca3af;
}

.season-winner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--winner-color, #6b7280);
  background: linear-gradient(135deg, color-mix(in srgb, var(--winner-color) 15%, transparent), transparent);
  border-radius: 8px;
}

.season-winner-emoji { font-size: 24px; }

.season-winner-name {
  font-weight: 700;
  font-size: 16px;
  flex: 1;
}

.season-winner-score {
  font-size: 18px;
  font-weight: 800;
  color: var(--winner-color, #1f2937);
}

.season-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.season-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}

.season-result-rank { width: 24px; text-align: center; }
.season-result-name { flex: 1; font-weight: 600; }
.season-result-score { font-weight: 700; }
.season-result-prestige { color: #fbbf24; font-size: 12px; }

/* ── Agent Profiles ───────────────────────────────────────────────── */

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

.profile-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.profile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.dark .profile-card {
  background: #1f2937;
  border-color: #374151;
}

.dark .profile-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.profile-header {
  padding: 20px 16px 12px;
  text-align: center;
}

.profile-emoji { font-size: 36px; margin-bottom: 4px; }

.profile-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--agent-color, #1f2937);
}

.dark .profile-name {
  color: var(--agent-color, #e5e7eb);
}

.profile-title {
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: #e5e7eb;
  border-top: 1px solid #e5e7eb;
}

.dark .profile-stats {
  background: #374151;
  border-top-color: #374151;
}

.profile-stat {
  padding: 12px 8px;
  text-align: center;
  background: white;
}

.dark .profile-stat {
  background: #1f2937;
}

.stat-value {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #1f2937;
}

.dark .stat-value {
  color: #f3f4f6;
}

.stat-label {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ── Loading ──────────────────────────────────────────────────────── */

.prestige-loading {
  text-align: center;
  padding: 48px;
  color: #9ca3af;
  font-size: 14px;
}

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

@media (max-width: 768px) {
  .prestige-podium {
    flex-direction: column;
    align-items: stretch;
  }

  .prestige-card {
    max-width: 100%;
    min-width: 0;
  }

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

  .prestige-container {
    padding: 12px;
  }

  .season-winner {
    flex-wrap: wrap;
  }
}
