/* dashboard.css — dashboard, problems list, leaderboard, profile, premium/payment */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.topbar h1 { font-size: 1.6rem; margin: 0; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: transform 0.15s, border-color 0.15s;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--accent-mint-dim); }
.stat-card .value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--accent-mint);
}
.stat-card .label { font-size: 0.8rem; color: var(--text-muted); }

.section-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

#recent-activity, #leaderboard-list { list-style: none; padding: 0; margin: 0; }
#recent-activity li, .leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}
#recent-activity li:last-child, .leaderboard-row:last-child { border-bottom: none; }
.status { margin-left: auto; font-size: 0.78rem; text-transform: capitalize; }
.status--solved { color: var(--accent-green); }
.status--attempted { color: var(--accent-amber); }

.leaderboard-row .rank { width: 40px; font-family: var(--font-mono); color: var(--accent-mint); }
.leaderboard-row .name { flex: 1; }
.leaderboard-row .xp { color: var(--text-muted); }

.empty-row { color: var(--text-muted); padding: 20px 0; text-align: center; }

/* Bug / Question type tabs (problems.html) */
.type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.type-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.type-tab:hover { color: var(--text-primary); }
.type-tab.active { color: var(--accent-mint); border-bottom-color: var(--accent-mint); }

/* Filters bar (problems.html) */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.filters-bar select, .filters-bar input {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.filters-bar input { flex: 1; min-width: 180px; }

.problems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.problem-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: block;
  transition: border-color 0.15s, transform 0.1s;
}
.problem-card:hover { border-color: var(--accent-mint); transform: translateY(-2px); }
.problem-card__top { display: flex; justify-content: space-between; margin-bottom: 12px; }
.problem-card h3 { font-size: 1rem; margin-bottom: 10px; }
.problem-card__meta { display: flex; gap: 12px; align-items: center; }
.solved-check { display: block; margin-top: 10px; color: var(--accent-green); font-size: 0.82rem; }

.problem-card--locked { opacity: 0.6; }
.lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 14, 20, 0.55);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-amber);
}

/* Ad card that sits inline in the problems grid, every few cards */
.problems-grid .ad-slot--grid {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

/* Premium / payment pages */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 800px;
}
.plan-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  overflow: visible;
}
.plan-card.featured { border-color: var(--accent-amber); }
.discount-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.discount-badge--featured { background: var(--accent-amber); color: #2a1e04; }
.price-old {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 400;
  margin-right: 8px;
}
.price-save { color: var(--accent-green); font-size: 0.82rem; font-weight: 600; margin: -4px 0 8px; }
.plan-card .price { font-family: var(--font-display); font-size: 2rem; margin: 10px 0 4px; color: var(--accent-mint); }
.plan-card ul { list-style: none; padding: 0; text-align: left; margin: 20px 0; color: var(--text-muted); }
.plan-card ul li { padding: 6px 0; }
.plan-card ul li::before { content: "✓ "; color: var(--accent-green); }

.compare-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.88rem; }
.compare-table tr { border-bottom: 1px solid var(--border-subtle); }
.compare-table tr:last-child { border-bottom: none; }
.compare-table td { padding: 10px 6px; color: var(--text-muted); }
.compare-table td:first-child { color: var(--text-primary); }
.compare-table td:nth-child(2), .compare-table td:nth-child(3) { text-align: center; width: 100px; }

/* Profile page */
.profile-header-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  max-width: 500px;
}
.profile-header-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-mint-dim);
  color: #eafffb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  flex-shrink: 0;
}
