/* ═════════════════════════════════════════════════════════════════════════════
   CrowdVerse Redesign — Making the UI approachable, game-like, and fun
   ═════════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   1. SOFTER COLOR PALETTE & IMPROVED VARIABLES
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  /* Softer, more approachable colors */
  --cv-black:       #0d0d0f;
  --cv-off-black:   #121216;
  --cv-dark:        #1a1a1f;
  --cv-dark2:       #222228;
  --cv-border:      #2a2a32;
  --cv-border2:     #33333d;
  
  /* Softer green — less neon, more mint */
  --cv-green:       #7dd87d;
  --cv-green-light: #a8e6a8;
  --cv-green-dim:   #5aa85a;
  --cv-green-glow:  rgba(125, 216, 125, 0.12);
  --cv-green-glow2: rgba(125, 216, 125, 0.06);
  
  /* Softer red */
  --cv-red:         #e07070;
  --cv-red-dim:     #b05050;
  --cv-red-glow:    rgba(224, 112, 112, 0.12);
  
  /* Warmer white tones */
  --cv-white:       #f0f0f5;
  --cv-white1:      #2e2e38;
  --cv-white2:      #a0a0b0;
  --cv-white3:      #6a6a7a;
  
  /* Accent colors */
  --cv-yellow:      #e8c547;
  --cv-blue:        #6b9eff;
  --cv-purple:      #b8a0e8;
  
  /* Game-like gradients */
  --cv-gradient-green: linear-gradient(135deg, var(--cv-green) 0%, var(--cv-green-dim) 100%);
  --cv-gradient-card:  linear-gradient(180deg, var(--cv-dark) 0%, var(--cv-off-black) 100%);
  
  /* Spacing improvements */
  --cv-radius-sm: 8px;
  --cv-radius-md: 12px;
  --cv-radius-lg: 16px;
  --cv-radius-xl: 24px;
  
  /* Shadows */
  --cv-shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --cv-shadow-md: 0 4px 16px rgba(0,0,0,0.25);
  --cv-shadow-glow: 0 0 30px rgba(125, 216, 125, 0.15);
}

/* Apply softer palette to existing variables */
body {
  --black: var(--cv-black);
  --off-black: var(--cv-off-black);
  --dark: var(--cv-dark);
  --dark2: var(--cv-dark2);
  --border: var(--cv-border);
  --border2: var(--cv-border2);
  --green: var(--cv-green);
  --green-dim: var(--cv-green-dim);
  --green-glow: var(--cv-green-glow);
  --green-glow2: var(--cv-green-glow2);
  --red: var(--cv-red);
  --yellow: var(--cv-yellow);
  --white: var(--cv-white);
  --white1: var(--cv-white1);
  --white2: var(--cv-white2);
  --white3: var(--cv-white3);
}

/* Also define at root for broader compatibility */
:root {
  --cv-black: #0d0d0f;
  --cv-off-black: #121216;
  --cv-dark: #1a1a1f;
  --cv-dark2: #222228;
  --cv-border: #2a2a32;
  --cv-border2: #33333d;
  --cv-green: #7dd87d;
  --cv-green-light: #a8e6a8;
  --cv-green-dim: #5aa85a;
  --cv-green-glow: rgba(125, 216, 125, 0.12);
  --cv-green-glow2: rgba(125, 216, 125, 0.06);
  --cv-red: #e07070;
  --cv-red-dim: #b05050;
  --cv-yellow: #e8c547;
  --cv-white: #f0f0f5;
  --cv-white1: #2e2e38;
  --cv-white2: #a0a0b0;
  --cv-white3: #6a6a7a;
}

/* ─────────────────────────────────────────────────────────────────────────────
   2. ENHANCED MARKET CARDS (Live stats, visual bar, countdown, category emoji)
   ───────────────────────────────────────────────────────────────────────────── */

.market-card-v2 {
  background: var(--cv-gradient-card);
  border: 1px solid var(--cv-border);
  border-radius: var(--cv-radius-lg);
  padding: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.market-card-v2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cv-green) 0%, var(--cv-blue) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.market-card-v2:hover {
  border-color: rgba(125, 216, 125, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--cv-shadow-md), var(--cv-shadow-glow);
}

.market-card-v2:hover::before {
  opacity: 1;
}

/* Card Header with Category & Share */
.market-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.market-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.75rem;
  background: var(--cv-dark2);
  border: 1px solid var(--cv-border2);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cv-white2);
  transition: all 0.2s;
}

.market-card-v2:hover .market-category-badge {
  border-color: rgba(125, 216, 125, 0.3);
  color: var(--cv-green);
}

.market-category-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.market-category-emoji {
  font-size: 0.9rem;
}

/* Live Indicator */
.market-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.25rem 0.6rem;
  background: rgba(125, 216, 125, 0.1);
  border: 1px solid rgba(125, 216, 125, 0.25);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--cv-green);
}

.market-live-indicator::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--cv-green);
  border-radius: 50%;
  animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Question */
.market-question-v2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--cv-white);
  margin-bottom: 1rem;
}

/* Visual Yes/No Bar */
.market-outcomes-bar {
  margin-bottom: 1rem;
}

.outcome-bar-wrapper {
  display: flex;
  height: 36px;
  border-radius: var(--cv-radius-md);
  overflow: hidden;
  position: relative;
  background: var(--cv-dark2);
}

.outcome-bar-yes {
  background: linear-gradient(135deg, rgba(125, 216, 125, 0.9) 0%, rgba(90, 168, 90, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cv-black);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.outcome-bar-no {
  background: linear-gradient(135deg, rgba(224, 112, 112, 0.9) 0%, rgba(176, 80, 80, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cv-white);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.outcome-bar-label {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card Stats Row */
.market-card-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--cv-dark2);
  border-radius: var(--cv-radius-md);
  margin-bottom: 1rem;
}

.stat-item-v2 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cv-white2);
}

.stat-item-v2 .stat-value {
  color: var(--cv-white);
  font-weight: 600;
}

.stat-item-v2 .stat-icon {
  font-size: 0.9rem;
}

/* Countdown Timer */
.countdown-timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.3rem 0.6rem;
  background: rgba(232, 197, 71, 0.1);
  border: 1px solid rgba(232, 197, 71, 0.2);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cv-yellow);
}

.countdown-timer.urgent {
  background: rgba(224, 112, 112, 0.1);
  border-color: rgba(224, 112, 112, 0.25);
  color: var(--cv-red);
  animation: urgent-pulse 1.5s infinite;
}

@keyframes urgent-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Predicted Badge */
.market-predicted-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.25rem 0.6rem;
  background: var(--cv-green-glow);
  border: 1px solid rgba(125, 216, 125, 0.3);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--cv-green);
}

/* Vote Buttons */
.market-vote-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.vote-btn-v2 {
  padding: 0.85rem;
  border: 1px solid var(--cv-border2);
  border-radius: var(--cv-radius-md);
  background: var(--cv-dark2);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.vote-btn-v2.yes {
  color: var(--cv-green);
  border-color: rgba(125, 216, 125, 0.25);
}

.vote-btn-v2.yes:hover {
  background: rgba(125, 216, 125, 0.12);
  border-color: rgba(125, 216, 125, 0.4);
  transform: translateY(-2px);
}

.vote-btn-v2.no {
  color: var(--cv-red);
  border-color: rgba(224, 112, 112, 0.25);
}

.vote-btn-v2.no:hover {
  background: rgba(224, 112, 112, 0.12);
  border-color: rgba(224, 112, 112, 0.4);
  transform: translateY(-2px);
}

.vote-btn-v2 .btn-label {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* ─────────────────────────────────────────────────────────────────────────────
   3. NAVBAR ENHANCEMENTS (Streak counter & Animated wallet)
   ───────────────────────────────────────────────────────────────────────────── */

/* Animated Token Wallet */
.token-wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.4rem 1rem;
  background: linear-gradient(135deg, var(--cv-dark2) 0%, var(--cv-dark) 100%);
  border: 1px solid var(--cv-border2);
  border-radius: 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cv-green);
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.token-wallet::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(125, 216, 125, 0.1), transparent);
  animation: wallet-shimmer 3s infinite;
}

@keyframes wallet-shimmer {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.token-wallet:hover {
  border-color: rgba(125, 216, 125, 0.3);
  box-shadow: 0 0 15px rgba(125, 216, 125, 0.1);
}

.token-wallet-icon {
  width: 20px;
  height: 20px;
  animation: token-float 3s ease-in-out infinite;
}

@keyframes token-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(5deg); }
}

.token-wallet-amount {
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* Streak Counter */
.streak-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.9rem;
  background: linear-gradient(135deg, rgba(232, 197, 71, 0.1) 0%, rgba(232, 197, 71, 0.05) 100%);
  border: 1px solid rgba(232, 197, 71, 0.25);
  border-radius: 24px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cv-yellow);
  transition: all 0.3s;
}

.streak-counter:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(232, 197, 71, 0.15);
}

.streak-counter .streak-icon {
  font-size: 1rem;
  animation: flame-flicker 1s ease-in-out infinite alternate;
}

@keyframes flame-flicker {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.streak-counter .streak-count {
  font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────────────────────
   4. BADGE / MILESTONE SYSTEM
   ───────────────────────────────────────────────────────────────────────────── */

.badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem;
  background: var(--cv-dark2);
  border: 1px solid var(--cv-border2);
  border-radius: var(--cv-radius-md);
  min-width: 80px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.badge:hover {
  transform: translateY(-3px);
  border-color: rgba(125, 216, 125, 0.3);
}

.badge.locked {
  opacity: 0.5;
  filter: grayscale(0.8);
}

.badge.locked::after {
  content: '🔒';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  opacity: 0.8;
}

.badge-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--cv-dark);
  border-radius: 50%;
  transition: all 0.3s;
}

.badge:hover .badge-icon {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(125, 216, 125, 0.2);
}

.badge-name {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--cv-white);
  text-align: center;
}

.badge.desc {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--cv-white3);
  text-align: center;
}

/* Badge unlock animation */
@keyframes badge-unlock {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.badge.unlocked {
  animation: badge-unlock 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-color: var(--cv-green);
  background: var(--cv-green-glow);
}

/* ─────────────────────────────────────────────────────────────────────────────
   5. MICRO-ANIMATIONS (Coin burst, confetti)
   ───────────────────────────────────────────────────────────────────────────── */

/* Coin burst animation */
.coin-burst {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
}

.coin-particle {
  position: absolute;
  width: 20px;
  height: 20px;
  background: url('../assets/Token.png') center/contain no-repeat;
  animation: coin-fly 1s ease-out forwards;
}

@keyframes coin-fly {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) rotate(720deg) scale(0.5);
    opacity: 0;
  }
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--cv-green);
  animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100%) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Success checkmark animation */
.success-checkmark {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--cv-green-glow);
  border: 2px solid var(--cv-green);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: checkmark-pop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkmark-pop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   6. 3-STEP ONBOARDING WIZARD
   ───────────────────────────────────────────────────────────────────────────── */

.onboarding-wizard {
  max-width: 460px;
  margin: 0 auto;
}

.wizard-progress {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.wizard-step-dot {
  width: 32px;
  height: 4px;
  background: var(--cv-border2);
  border-radius: 2px;
  transition: all 0.3s;
}

.wizard-step-dot.active {
  background: var(--cv-green);
  width: 48px;
}

.wizard-step-dot.completed {
  background: var(--cv-green-dim);
}

.wizard-card {
  background: var(--cv-dark);
  border: 1px solid var(--cv-border);
  border-radius: var(--cv-radius-lg);
  padding: 2rem;
  text-align: center;
  animation: wizard-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes wizard-slide-in {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.wizard-illustration {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  background: var(--cv-dark2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  animation: illustration-float 3s ease-in-out infinite;
}

@keyframes illustration-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.wizard-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--cv-white);
}

.wizard-desc {
  color: var(--cv-white2);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.wizard-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.wizard-buttons .btn {
  min-width: 120px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   7. FRIENDLY EMPTY STATES
   ───────────────────────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--cv-dark);
  border: 1px dashed var(--cv-border2);
  border-radius: var(--cv-radius-lg);
}

.empty-state-illustration {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.8;
  animation: empty-bounce 2s ease-in-out infinite;
}

@keyframes empty-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cv-white);
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  color: var(--cv-white2);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* ─────────────────────────────────────────────────────────────────────────────
   8. COLLAPSIBLE DISCLAIMERS
   ───────────────────────────────────────────────────────────────────────────── */

.collapsible-section {
  background: var(--cv-dark);
  border: 1px solid var(--cv-border);
  border-radius: var(--cv-radius-md);
  overflow: hidden;
  margin: 1rem 0;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
}

.collapsible-header:hover {
  background: var(--cv-dark2);
}

.collapsible-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cv-white);
}

.collapsible-header-icon {
  font-size: 1.2rem;
}

.collapsible-toggle {
  font-size: 1rem;
  color: var(--cv-white3);
  transition: transform 0.3s;
}

.collapsible-section.open .collapsible-toggle {
  transform: rotate(180deg);
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.collapsible-section.open .collapsible-content {
  max-height: 500px;
}

.collapsible-inner {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.85rem;
  color: var(--cv-white2);
  line-height: 1.7;
}

/* Safety popup */
.safety-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.safety-popup.show {
  opacity: 1;
  pointer-events: auto;
}

.safety-popup-content {
  background: var(--cv-dark);
  border: 1px solid var(--cv-border);
  border-radius: var(--cv-radius-lg);
  padding: 2rem;
  max-width: 400px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.safety-popup.show .safety-popup-content {
  transform: scale(1);
}

.safety-popup-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.safety-popup h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--cv-white);
}

.safety-popup p {
  color: var(--cv-white2);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   9. MODAL ANIMATIONS & TRANSITIONS
   ───────────────────────────────────────────────────────────────────────────── */

.modal-overlay-v2 {
  position: fixed;
  inset: 0;
  background: rgba(13, 13, 15, 0.9);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay-v2.show {
  opacity: 1;
}

.modal-v2 {
  background: var(--cv-dark);
  border: 1px solid var(--cv-border);
  border-radius: var(--cv-radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  transform: scale(0.95) translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay-v2.show .modal-v2 {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Modal fade variants */
.modal-fade-up {
  animation: modal-fade-up 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modal-fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   10. SOCIAL FEATURES & CHALLENGES
   ───────────────────────────────────────────────────────────────────────────── */

/* Challenges / Quests */
.challenges-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.challenge-card {
  background: var(--cv-dark);
  border: 1px solid var(--cv-border);
  border-radius: var(--cv-radius-md);
  padding: 1rem;
  transition: all 0.3s;
}

.challenge-card:hover {
  border-color: rgba(125, 216, 125, 0.2);
  transform: translateX(4px);
}

.challenge-card.completed {
  border-color: var(--cv-green);
  background: var(--cv-green-glow);
}

.challenge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.challenge-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cv-white);
}

.challenge-icon {
  font-size: 1.2rem;
}

.challenge-reward {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.25rem 0.6rem;
  background: var(--cv-dark2);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cv-green);
}

.challenge-desc {
  font-size: 0.8rem;
  color: var(--cv-white2);
  margin-bottom: 0.75rem;
}

.challenge-progress-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.challenge-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--cv-dark2);
  border-radius: 4px;
  overflow: hidden;
}

.challenge-progress-fill {
  height: 100%;
  background: var(--cv-gradient-green);
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.challenge-progress-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cv-white3);
  min-width: 45px;
  text-align: right;
}

/* Referral Section */
.referral-box {
  background: linear-gradient(135deg, rgba(125, 216, 125, 0.08) 0%, rgba(107, 158, 255, 0.05) 100%);
  border: 1px solid rgba(125, 216, 125, 0.2);
  border-radius: var(--cv-radius-md);
  padding: 1.25rem;
}

.referral-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.referral-icon {
  font-size: 1.5rem;
}

.referral-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--cv-white);
}

.referral-desc {
  font-size: 0.85rem;
  color: var(--cv-white2);
  margin-bottom: 1rem;
}

.referral-code-box {
  display: flex;
  gap: 0.5rem;
}

.referral-code-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--cv-dark2);
  border: 1px solid var(--cv-border2);
  border-radius: var(--cv-radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cv-green);
  text-align: center;
}

/* Share button enhancement */
.share-btn-enhanced {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  background: var(--cv-dark2);
  border: 1px solid var(--cv-border2);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cv-white2);
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn-enhanced:hover {
  background: rgba(125, 216, 125, 0.1);
  border-color: rgba(125, 216, 125, 0.3);
  color: var(--cv-green);
  transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────────────────────────────────
   UTILITY CLASSES
   ───────────────────────────────────────────────────────────────────────────── */

.cv-fade-in {
  animation: cv-fade-in 0.5s ease forwards;
}

@keyframes cv-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.cv-slide-up {
  animation: cv-slide-up 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cv-slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.cv-pop-in {
  animation: cv-pop-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cv-pop-in {
  0% { transform: scale(0.8); opacity: 0; }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

/* Breathing room improvements */
.section-v2 {
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Better typography */
.heading-v2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--cv-white);
}

.text-soft {
  color: var(--cv-white2);
  line-height: 1.7;
}

/* Focus improvements */
.btn:focus-visible,
.vote-btn-v2:focus-visible,
.market-card-v2:focus-visible {
  outline: 2px solid var(--cv-green);
  outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .market-card-v2 {
    padding: 1rem;
  }
  
  .market-question-v2 {
    font-size: 0.95rem;
  }
  
  .wizard-card {
    padding: 1.5rem;
  }
  
  .wizard-illustration {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
  }
  
  .badge {
    min-width: 70px;
    padding: 0.6rem;
  }
  
  .badge-icon {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
}
