/* ═══════════════════════════════════════════════════════════════════════════
   UX AUDIT FIXES
   Applied in order of audit priority (P0 → P3)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── P0: Kill all decorative hero orbs / particles / glows ─────────────── */
.hero-orb,
.hero-orb-1,
.hero-orb-2,
.hero-orb-3,
.hero-particles,
.hero-gradient-orb,
.bg-glow,
.bg-glow-1,
.bg-glow-2,
.bg-glow-3,
.hero-bg-effects {
  display: none !important;
  pointer-events: none !important;
}

/* ── P0: Fix dark-mode contrast ────────────────────────────────────────── */
/* Card surfaces: bump from #0f0f12 → #141419 for legible separation */
:root {
  --color-bg-elevated: #141419;
  --color-bg-surface: #1c1c24;
  --color-text-secondary: rgba(255, 255, 255, 0.78);
  --color-text-muted: rgba(255, 255, 255, 0.56);
  --color-border-default: rgba(255, 255, 255, 0.10);
  --color-border-strong: rgba(255, 255, 255, 0.16);
}

/* Add subtle borders to all cards for visible separation */
.bento-card,
.stat-card,
.widget-card,
.activity-item,
.match-card,
.training-card,
.journal-card,
.streak-card,
.chart-card,
.goal-card,
.season-card,
.rating-card,
.metric-card,
.feature-card,
.info-card {
  border: 1px solid var(--color-border-default) !important;
}

/* ── P1: Hero section cleanup — less visual noise ──────────────────────── */
.page-hero,
.hero-section,
[class*="hero-banner"] {
  background: var(--color-bg-base) !important;
  border-bottom: 1px solid var(--color-border-default);
  padding-block: 24px 20px !important;
  position: relative;
}

/* Remove all animated gradients from hero backgrounds */
.page-hero::before,
.page-hero::after,
.hero-section::before,
.hero-section::after {
  display: none !important;
}

/* ── P1: Empty state styling ───────────────────────────────────────────── */
.activity-empty-state,
.empty-state,
[class*="empty-state"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  text-align: center;
}

.activity-empty-state h4,
.empty-state h4 {
  color: var(--color-text-primary, #fff);
  font-size: 16px;
  font-weight: 600;
  margin: 12px 0 4px;
}

.activity-empty-state p,
.empty-state p {
  color: var(--color-text-muted);
  font-size: 13px;
  margin: 0 0 16px;
  max-width: 280px;
}

/* ── P1: Reduce PRO-lock visual overload  ──────────────────────────────── */
/* Only show first 2 PRO badges per visible page, hide the rest */
.page.active .pro-lock:nth-child(n+4),
.page.active [class*="pro-overlay"]:nth-child(n+4) {
  opacity: 0.3;
}

/* Make PRO overlays less aggressive — softer blur, smaller badge */
.pro-locked-card > .pro-lock-overlay,
.ax-card .ax-pro-overlay {
  backdrop-filter: blur(2px) !important;
  -webkit-backdrop-filter: blur(2px) !important;
}

.pro-locked-card > .pro-lock-overlay .pro-badge,
.ax-card .ax-pro-overlay .pro-badge {
  transform: scale(0.85);
}

/* ── P2: Improve global typography contrast ────────────────────────────── */
/* Stat values — make numbers more prominent */
.stat-value,
.metric-value,
[class*="stat-number"],
[class*="stat-val"] {
  color: #fff !important;
  font-weight: 700 !important;
}

/* Stat labels — ensure readable */
.stat-label,
.metric-label,
[class*="stat-lbl"] {
  color: rgba(255, 255, 255, 0.65) !important;
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── P2: Better hover states ───────────────────────────────────────────── */
.bento-card:hover,
.stat-card:hover,
.widget-card:hover {
  border-color: rgba(99, 102, 241, 0.25) !important;
  transition: border-color 0.2s ease;
}

/* ── P2: Improvement Score widget ──────────────────────────────────────── */
.improvement-score-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.improvement-ring {
  position: relative;
  width: 120px;
  height: 120px;
}

.improvement-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.improvement-ring .ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 8;
}

.improvement-ring .ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.4s ease;
}

.improvement-score-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.improvement-score-number {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.improvement-score-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.improvement-factors {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.improvement-factor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.improvement-factor-value {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.improvement-factor-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.improvement-delta {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 12px;
}

.improvement-delta.up {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.improvement-delta.down {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.improvement-delta.stable {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

/* ── P2: Today's Agenda widget ─────────────────────────────────────────── */
.agenda-widget {
  padding: 16px;
}

.agenda-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.agenda-item:last-child {
  border-bottom: none;
}

.agenda-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.agenda-icon.match {
  background: rgba(99, 102, 241, 0.12);
}

.agenda-icon.training {
  background: rgba(34, 197, 94, 0.12);
}

.agenda-icon.goal {
  background: rgba(245, 158, 11, 0.12);
}

.agenda-icon.recovery {
  background: rgba(139, 92, 246, 0.12);
}

.agenda-info {
  flex: 1;
  min-width: 0;
}

.agenda-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agenda-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

.agenda-empty {
  text-align: center;
  padding: 24px 16px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

/* ── P3: Insights card styling ─────────────────────────────────────────── */
.insight-card {
  padding: 14px 16px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 10px;
  margin-bottom: 8px;
}

.insight-card .insight-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px;
}

.insight-card .insight-body {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  line-height: 1.5;
}

.insight-card .insight-icon {
  font-size: 16px;
  margin-right: 8px;
}

/* ── Hide sidebar Go Premium CTA ──────────────────────────────────────── */
.upgrade-banner {
  display: none !important;
}

/* ── Hide home page Go Pro bento card ─────────────────────────────────── */
.bento-pro {
  display: none !important;
}

/* ── Responsive: new widget cards at 1200px breakpoint ────────────────── */
@media (max-width: 1200px) {
  .bento-improvement-score,
  .bento-agenda,
  .bento-insights {
    grid-column: span 6;
  }
}
