/* Gamify global theme — deep space black #05050F */

:root {
  --bg: #05050F;
  --surface: #0c0c18;
  --surface2: #141422;
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.14);
}

html,
body,
#loading-screen,
#auth-screen,
#onboarding,
.v2-home,
.v2-section,
.drawer {
  background-color: var(--bg);
}

body {
  background: radial-gradient(ellipse 120% 80% at 50% -30%, rgba(139, 131, 232, 0.06) 0%, transparent 55%), var(--bg);
}

/* Nav & drawer icons — higher contrast */
.drawer-item-icon,
.nav-icon,
.v2-bubble-icon {
  filter: saturate(1.35) brightness(1.15);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.12);
}

.drawer-item.active .drawer-item-icon,
.nav-btn.active .nav-icon {
  filter: saturate(1.5) brightness(1.25);
  text-shadow: 0 0 16px rgba(139, 131, 232, 0.45);
}

/* Home rank progress bar */
.v3-rank-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 4px;
  flex-shrink: 0;
}

.v3-rank-bar-badge {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 52px;
}

.v3-rank-bar-label {
  font-size: 9px;
  font-family: var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  max-width: 64px;
  line-height: 1.2;
}

.v3-rank-bar-track-wrap {
  flex: 1;
  min-width: 0;
}

.v3-rank-bar-xp {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-family: var(--mono);
  color: var(--hint);
  margin-bottom: 4px;
}

.v3-rank-bar-track {
  height: 8px;
  background: var(--surface2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.v3-rank-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #f0f0f8;
  transition: width 0.5s ease, background 0.35s ease;
  width: 0%;
}

.v3-rank-bar-fill.high {
  background: var(--green);
}

.v3-rank-badge-lg svg,
.v3-rank-badge-lg .v3-rank-octagon {
  width: 48px;
  height: 48px;
}

.v3-rank-badge-xl svg,
.v3-rank-badge-xl .v3-rank-octagon {
  width: 64px;
  height: 64px;
}

/* Ranks page */
.page-ranks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.rank-tier-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.rank-tier-card.locked {
  opacity: 0.45;
}

.rank-tier-card.unlocked {
  border-color: rgba(139, 131, 232, 0.35);
}

.rank-tier-meta {
  flex: 1;
  min-width: 0;
}

.rank-tier-name {
  font-size: 16px;
  font-weight: 800;
}

.rank-tier-xp {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--muted);
  margin-top: 2px;
}

.rank-tier-status {
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 700;
}

.coming-soon-tag {
  display: inline-block;
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(139, 131, 232, 0.15);
  color: var(--purple);
  margin-left: 8px;
}

.v2-card-stack.no-h-scroll {
  overflow-x: hidden;
}

.v2-celebrate,
#wk-card-finish .v2-card-inner {
  overflow-x: hidden;
}

.wk-exercise-rail-label {
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
}

.drawer-item.hidden-nav {
  display: none !important;
}
