/* NPC Challenge Bots — Spectator Styles */

.npcs-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.npcs-header {
  text-align: center;
  margin-bottom: 24px;
}

.npcs-header h2 {
  font-size: 1.8rem;
  margin: 0 0 4px;
}

.npcs-subtitle {
  color: #6b7280;
  font-size: 0.95rem;
  margin: 0;
}

/* Stats Row */
.npcs-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.npcs-stat-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.npcs-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.npcs-stat-label {
  font-size: 0.8rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Profile Cards Grid */
.npcs-profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.npcs-profile-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.npcs-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.npcs-profile-emoji {
  font-size: 2rem;
}

.npcs-profile-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: #111827;
}

.npcs-profile-personality {
  font-size: 0.8rem;
  color: #6b7280;
}

.npcs-status-badge {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

.npcs-status-badge.active {
  background: #d1fae5;
  color: #065f46;
}

.npcs-status-badge.inactive {
  background: #f3f4f6;
  color: #6b7280;
}

.npcs-profile-strategy {
  margin-bottom: 8px;
}

.npcs-strategy-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}

.npcs-profile-quote {
  font-style: italic;
  color: #4b5563;
  font-size: 0.9rem;
  margin: 8px 0;
  padding-left: 12px;
  border-left: 2px solid #d1d5db;
}

.npcs-profile-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #6b7280;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}

/* Activity Table */
.npcs-activity-table {
  margin-bottom: 24px;
}

.npcs-activity-table h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.npcs-activity-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.npcs-activity-table th {
  text-align: left;
  padding: 8px 12px;
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
  font-weight: 600;
  color: #374151;
}

.npcs-activity-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
}

.npcs-goal {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6b7280;
}

/* How It Works */
.npcs-how-it-works {
  margin-top: 24px;
}

.npcs-how-it-works h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

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

.npcs-rule {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.npcs-rule-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 8px;
}

.npcs-rule strong {
  display: block;
  margin-bottom: 4px;
  color: #111827;
}

.npcs-rule p {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0;
}

/* Loading & Error */
.npcs-loading,
.npcs-error {
  text-align: center;
  padding: 40px;
  color: #6b7280;
}

.npcs-error {
  color: #ef4444;
}

/* ── Dark Mode ── */
.dark .npcs-stat-card {
  background: #1f2937;
  border-color: #374151;
}

.dark .npcs-stat-value {
  color: #f9fafb;
}

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

.dark .npcs-profile-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.dark .npcs-profile-name {
  color: #f9fafb;
}

.dark .npcs-profile-quote {
  color: #9ca3af;
  border-left-color: #4b5563;
}

.dark .npcs-activity-table th {
  background: #1f2937;
  border-color: #374151;
  color: #d1d5db;
}

.dark .npcs-activity-table td {
  border-color: #374151;
}

.dark .npcs-rule {
  background: #1f2937;
  border-color: #374151;
}

.dark .npcs-rule strong {
  color: #f9fafb;
}

.dark .npcs-how-it-works h3,
.dark .npcs-activity-table h3 {
  color: #f9fafb;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .npcs-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .npcs-profiles-grid {
    grid-template-columns: 1fr;
  }

  .npcs-rules-grid {
    grid-template-columns: 1fr;
  }

  .npcs-activity-table {
    overflow-x: auto;
  }

  .npcs-profile-header {
    flex-wrap: wrap;
  }

  .npcs-status-badge {
    margin-left: 0;
  }
}
