/* ============================================ */
/* CHALLENGES - SCI-FI CYBERPUNK                */
/* Glass + Neon + HUD + Color Themes           */
/* ============================================ */

:root {
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: blur(20px);
  --text-primary: #e8e0f0;
  --text-secondary: #a090b8;
  --text-muted: #6a5a7a;
  --bg-primary: #0a0810;
  --bg-secondary: #12101f;
  --neon-purple: #8A19E1;
  --neon-cyan: #58ebfe;
  --neon-pink: #ff00ea;
  --neon-green: #4ff3a6;
  --neon-gold: #ffc72e;
  --neon-orange: #ff6b00;
  --neon-red: #ff0040;
  --purple-glow: rgba(138, 25, 225, 0.3);
  --cyan-glow: rgba(88, 235, 254, 0.15);
  --shadow-glow: 0 8px 40px rgba(0, 0, 0, 0.6);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --font-display: 'Orbitron', 'Share Tech Mono', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  --accent-1: #ff00ea;
  --accent-2: #8A19E1;
  --accent-3: #ff69b4;
  --accent-gradient: linear-gradient(135deg, #ff00ea, #8A19E1);
}

/* Blue/Green theme */
body.blue-green {
  --accent-1: #58ebfe;
  --accent-2: #4ff3a6;
  --accent-3: #3B82F6;
  --accent-gradient: linear-gradient(135deg, #58ebfe, #4ff3a6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s ease;
}

/* ============================================ */
/* GRADIENT BACKGROUND                          */
/* ============================================ */

.gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background:
    radial-gradient(ellipse at 0% 0%, var(--accent-2) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, var(--accent-1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, var(--accent-3) 0%, transparent 60%);
  background-size: 200% 200%;
  animation: gradientWarm 25s ease-in-out infinite alternate;
  opacity: 0.2;
  pointer-events: none;
  transition: background 0.8s ease;
}

@keyframes gradientWarm {
  0%, 100% { background-position: 0% 0%; opacity: 0.15; }
  50% { background-position: 100% 100%; opacity: 0.25; }
}

body.blue-green .gradient-bg {
  background:
    radial-gradient(ellipse at 0% 0%, #58ebfe 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, #4ff3a6 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, #3B82F6 0%, transparent 60%);
}

/* ============================================ */
/* SCANLINE OVERLAY                            */
/* ============================================ */

.scanline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9997;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 3px
  );
  opacity: 1;
  transition: opacity 0.5s ease;
}

.scanline-overlay:not(.active) {
  opacity: 0;
}

body.hud-mode .scanline-overlay {
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(88, 235, 254, 0.015) 2px,
    rgba(88, 235, 254, 0.015) 3px,
    transparent 3px,
    transparent 5px,
    rgba(138, 25, 225, 0.015) 5px,
    rgba(138, 25, 225, 0.015) 6px
  );
  animation: scanMove 0.5s linear infinite;
}

@keyframes scanMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(6px); }
}

/* ============================================ */
/* GRID OVERLAY                                */
/* ============================================ */

.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9996;
  opacity: 0;
  transition: opacity 0.5s ease;
  background-image:
    linear-gradient(rgba(88, 235, 254, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 235, 254, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

body.grid-mode .grid-overlay {
  opacity: 1;
}

/* ============================================ */
/* PARTICLES                                   */
/* ============================================ */

.particle-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.3;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent-1);
  border-radius: 50%;
  animation: floatParticle 20s infinite linear;
  opacity: 0;
  box-shadow: 0 0 10px var(--accent-1);
  transition: background 0.8s ease, box-shadow 0.8s ease;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 22s; background: var(--accent-2); }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 18s; background: var(--accent-1); }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 25s; background: var(--accent-3); }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 20s; background: var(--accent-2); }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 23s; background: var(--accent-1); }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 19s; background: var(--accent-3); }
.particle:nth-child(7) { left: 70%; animation-delay: 2s; animation-duration: 21s; background: var(--accent-2); }
.particle:nth-child(8) { left: 80%; animation-delay: 4s; animation-duration: 24s; background: var(--accent-1); }
.particle:nth-child(9) { left: 15%; animation-delay: 6s; animation-duration: 17s; background: var(--accent-3); }
.particle:nth-child(10) { left: 45%; animation-delay: 3s; animation-duration: 26s; background: var(--accent-2); }
.particle:nth-child(11) { left: 75%; animation-delay: 5s; animation-duration: 22s; background: var(--accent-1); }
.particle:nth-child(12) { left: 90%; animation-delay: 7s; animation-duration: 20s; background: var(--accent-3); }

@keyframes floatParticle {
  0% { top: -10%; opacity: 0; transform: translateX(0) scale(0); }
  10% { opacity: 0.8; transform: translateX(10px) scale(1); }
  90% { opacity: 0.8; transform: translateX(-10px) scale(1); }
  100% { top: 110%; opacity: 0; transform: translateX(0) scale(0); }
}

body.light-mode .particle-overlay {
  opacity: 0.1;
}

/* ============================================ */
/* HUD CORNERS                                 */
/* ============================================ */

body.hud-mode::before {
  content: '';
  position: fixed;
  inset: 20px;
  pointer-events: none;
  z-index: 9998;
  border: 1px solid rgba(88, 235, 254, 0.05);
  border-radius: 4px;
}

body.hud-mode::after {
  content: '⏣ SYS: ONLINE  |  CHALLENGES: 0  |  HUD: v2.1';
  position: fixed;
  bottom: 80px;
  right: 30px;
  font-family: var(--font-mono);
  font-size: 0.45rem;
  color: rgba(88, 235, 254, 0.15);
  letter-spacing: 2px;
  z-index: 9998;
  pointer-events: none;
}

/* ============================================ */
/* THEME CONTROLS                              */
/* ============================================ */

.theme-controls {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(13, 11, 21, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 6px 10px;
  border-radius: 40px;
  border: 1px solid rgba(138, 25, 225, 0.15);
  box-shadow: var(--shadow-glow);
}

.theme-controls button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(138, 25, 225, 0.12);
  background: rgba(138, 25, 225, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-controls button:hover {
  background: rgba(138, 25, 225, 0.15);
  transform: scale(1.05);
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.theme-controls button.active {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(138, 25, 225, 0.25);
}

.theme-controls .separator {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================ */
/* MAIN CONTENT                                */
/* ============================================ */

.challenges-main {
  padding-top: 90px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.challenges-main .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================ */
/* PAGE HEADER                                 */
/* ============================================ */

.page-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 1rem 0;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 2px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
  text-shadow: none;
  filter: drop-shadow(0 0 40px rgba(138, 25, 225, 0.15));
  transition: background 0.8s ease;
}

.page-header h1 i {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

/* ============================================ */
/* TABS                                        */
/* ============================================ */

.challenge-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(88, 235, 254, 0.06);
  background: rgba(13, 11, 21, 0.3);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

body.light-mode .tab-btn {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary);
}

.tab-btn:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: rgba(138, 25, 225, 0.12);
  border-color: var(--accent-1);
  color: var(--accent-1);
  box-shadow: 0 0 20px rgba(138, 25, 225, 0.05);
}

.tab-btn i {
  font-size: 0.7rem;
}

/* ============================================ */
/* CHALLENGES GRID                             */
/* ============================================ */

.challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .challenges-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================ */
/* CHALLENGE CARD - GLASS + NEON              */
/* ============================================ */

.challenge-card {
  background: rgba(13, 11, 21, 0.5);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(88, 235, 254, 0.06);
  box-shadow: var(--shadow-glow);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  display: flex;
  flex-direction: column;
}

body.light-mode .challenge-card {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(0, 0, 0, 0.06);
}

.challenge-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.3;
  transition: opacity 0.4s ease;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.challenge-card:hover::before {
  opacity: 0.8;
}

.challenge-card:hover {
  transform: translateY(-6px);
  border-color: rgba(88, 235, 254, 0.12);
  box-shadow: var(--shadow-glow), 0 0 40px rgba(138, 25, 225, 0.03);
}

.challenge-header {
  padding: 1.5rem 1.5rem 0.5rem;
  text-align: center;
  position: relative;
}

.challenge-icon {
  font-size: 2.5rem;
  margin-bottom: 0.3rem;
  display: block;
}

.challenge-badges {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.3rem;
}

.challenge-type-badge {
  display: inline-block;
  padding: 0.15rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
  color: white;
}

.challenge-type-badge.daily { background: var(--neon-green); }
.challenge-type-badge.weekly { background: var(--neon-gold); }
.challenge-type-badge.monthly { background: var(--neon-purple); }
.challenge-type-badge.yearly { background: var(--neon-red); }

.challenge-intuit-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.45rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.challenge-status-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.45rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.challenge-status-badge.active {
  background: rgba(79, 243, 166, 0.12);
  color: var(--neon-green);
  border: 1px solid rgba(79, 243, 166, 0.1);
}

.challenge-status-badge.ending {
  background: rgba(255, 107, 0, 0.12);
  color: var(--neon-orange);
  border: 1px solid rgba(255, 107, 0, 0.1);
}

.challenge-status-badge.ended {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.1);
}

.challenge-content {
  padding: 1rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.challenge-title {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.challenge-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.challenge-tags {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.challenge-tag {
  padding: 0.1rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.5rem;
  color: var(--text-muted);
  background: rgba(13, 11, 21, 0.3);
  border: 1px solid rgba(88, 235, 254, 0.04);
  font-family: var(--font-mono);
}

body.light-mode .challenge-tag {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(0, 0, 0, 0.04);
}

.challenge-stats {
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(88, 235, 254, 0.04);
  border-bottom: 1px solid rgba(88, 235, 254, 0.04);
  margin-bottom: 0.75rem;
}

.challenge-stat {
  text-align: center;
}

.challenge-stat .stat-value {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-display);
  color: var(--accent-1);
  transition: color 0.8s ease;
}

.challenge-stat .stat-label {
  font-size: 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.challenge-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(13, 11, 21, 0.3);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

body.light-mode .challenge-countdown {
  background: rgba(255, 255, 255, 0.2);
}

.challenge-countdown .countdown-text {
  font-weight: 600;
  color: var(--accent-1);
  transition: color 0.8s ease;
}

.challenge-countdown .countdown-text.ending {
  color: var(--neon-orange);
}

.challenge-countdown .countdown-text.ended {
  color: #ef4444;
}

.challenge-prize {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(13, 11, 21, 0.3);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  border: 1px solid rgba(245, 158, 11, 0.08);
}

body.light-mode .challenge-prize {
  background: rgba(255, 255, 255, 0.2);
}

.challenge-prize i {
  color: var(--neon-gold);
  font-size: 0.9rem;
}

.challenge-prize .prize-text {
  font-size: 0.7rem;
  color: var(--text-secondary);
  flex: 1;
  font-family: var(--font-mono);
}

.challenge-prize .prize-badge-icon {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.45rem;
  font-weight: 600;
  background: var(--accent-gradient);
  color: white;
  font-family: var(--font-mono);
  transition: background 0.8s ease;
}

.challenge-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.challenge-actions .btn-challenge {
  flex: 1;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 80px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.challenge-actions .btn-challenge.join {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(138, 25, 225, 0.2);
  transition: background 0.8s ease;
}

.challenge-actions .btn-challenge.join:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(138, 25, 225, 0.3);
}

.challenge-actions .btn-challenge.joined {
  background: rgba(79, 243, 166, 0.15);
  color: var(--neon-green);
  border: 1px solid rgba(79, 243, 166, 0.15);
  cursor: default;
}

.challenge-actions .btn-challenge.joined:hover {
  transform: none;
  box-shadow: none;
}

.challenge-actions .btn-challenge.leave {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.15);
  flex: 0.5;
}

.challenge-actions .btn-challenge.leave:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: translateY(-2px);
}

.challenge-actions .btn-challenge.submit {
  background: rgba(16, 185, 129, 0.12);
  color: var(--neon-green);
  border: 1px solid rgba(16, 185, 129, 0.12);
  flex: 1;
}

.challenge-actions .btn-challenge.submit:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
}

.challenge-actions .btn-challenge.view-prizes {
  background: rgba(245, 158, 11, 0.08);
  color: var(--neon-gold);
  border: 1px solid rgba(245, 158, 11, 0.08);
  flex: 0.5;
}

.challenge-actions .btn-challenge.view-prizes:hover {
  background: rgba(245, 158, 11, 0.15);
  transform: translateY(-2px);
}

.challenge-actions .btn-challenge.browse {
  background: rgba(88, 235, 254, 0.08);
  color: var(--neon-cyan);
  border: 1px solid rgba(88, 235, 254, 0.08);
  flex: 1;
}

.challenge-actions .btn-challenge.browse:hover {
  background: rgba(88, 235, 254, 0.15);
  transform: translateY(-2px);
}

/* ============================================ */
/* POINTS CTA                                  */
/* ============================================ */

.points-cta {
  text-align: center;
  margin: 2rem 0 3rem;
}

.points-cta .btn-points {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 2rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--neon-gold), var(--neon-orange));
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.points-cta .btn-points:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(245, 158, 11, 0.3);
}

/* ============================================ */
/* LOADING & EMPTY STATES                      */
/* ============================================ */

.loading-state {
  text-align: center;
  padding: 3rem;
  grid-column: 1 / -1;
  color: var(--text-secondary);
}

.loading-state .spinner {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(88, 235, 254, 0.06);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
  transition: border-top-color 0.8s ease;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state p {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(13, 11, 21, 0.3);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-md);
  border: 1px solid rgba(88, 235, 254, 0.06);
  grid-column: 1 / -1;
  box-shadow: var(--shadow-glow);
}

body.light-mode .empty-state {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(0, 0, 0, 0.06);
}

.empty-state i {
  font-size: 3rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
  display: block;
  opacity: 0.5;
  transition: background 0.8s ease;
}

.empty-state h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-family: var(--font-display);
  margin-bottom: 0.3rem;
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.empty-state .empty-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.empty-state .btn-empty {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.empty-state .btn-empty.primary {
  background: var(--accent-gradient);
  color: white;
  transition: background 0.8s ease;
}

.empty-state .btn-empty.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(138, 25, 225, 0.2);
}

.empty-state .btn-empty.secondary {
  background: rgba(245, 158, 11, 0.1);
  color: var(--neon-gold);
  border: 1px solid rgba(245, 158, 11, 0.1);
}

.empty-state .btn-empty.secondary:hover {
  transform: translateY(-2px);
  background: rgba(245, 158, 11, 0.2);
}

/* ============================================ */
/* LIGHT MODE                                  */
/* ============================================ */

body.light-mode {
  --bg-primary: #f0ecf5;
  --bg-secondary: #e8e0f0;
  --text-primary: #1a1028;
  --text-secondary: #5a4a70;
  --text-muted: #8a7a9a;
}

body.light-mode .gradient-bg {
  opacity: 0.08;
}

body.light-mode .theme-controls {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .theme-controls button {
  color: var(--text-secondary);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .theme-controls button:hover {
  background: rgba(138, 25, 225, 0.08);
  color: var(--accent-1);
}

body.light-mode .theme-controls button.active {
  background: var(--accent-gradient);
  color: white;
}

/* ============================================ */
/* RESPONSIVE                                  */
/* ============================================ */

@media (max-width: 768px) {
  .challenges-main {
    padding-top: 80px;
  }

  .challenges-main .container {
    padding: 0 16px;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .challenge-tabs {
    gap: 0.3rem;
  }

  .tab-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.6rem;
  }

  .challenge-actions {
    flex-direction: column;
  }

  .challenge-actions .btn-challenge {
    flex: 1 1 auto;
    width: 100%;
  }

  .challenge-actions .btn-challenge.leave {
    flex: 1 1 auto;
  }

  .challenge-actions .btn-challenge.view-prizes {
    flex: 1 1 auto;
  }

  body.hud-mode::before {
    inset: 10px;
  }

  body.hud-mode::after {
    bottom: 70px;
    right: 20px;
    font-size: 0.35rem;
  }

  .theme-controls {
    bottom: 16px;
    right: 16px;
    padding: 4px 8px;
  }

  .theme-controls button {
    width: 28px;
    height: 28px;
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  .challenges-main {
    padding-top: 70px;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

  .page-header p {
    font-size: 0.9rem;
  }

  .challenge-card {
    margin: 0 0.5rem;
  }

  .challenge-content {
    padding: 0.8rem 1rem 1rem;
  }

  .challenge-title {
    font-size: 0.95rem;
  }

  .challenge-description {
    font-size: 0.75rem;
  }

  .tab-btn span {
    display: none;
  }

  .tab-btn i {
    font-size: 0.9rem;
  }
}
