:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255,255,255,0.04);
  --bg-glass: rgba(255,255,255,0.06);
  --border-glass: rgba(255,255,255,0.08);
  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --accent-indigo: #6366f1;
  --accent-violet: #8b5cf6;
  --accent-teal: #06b6d4;
  --accent-coral: #f43f5e;
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
  --gradient-coral: linear-gradient(135deg, #f43f5e, #fb7185);
}

[data-theme="light"] {
  --bg-primary: #f8f8fc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(0,0,0,0.03);
  --bg-glass: rgba(255,255,255,0.8);
  --border-glass: rgba(0,0,0,0.08);
  --text-primary: #1a1a2e;
  --text-secondary: #6b7280;
}

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

body {
  font-family: 'Bricolage Grotesque', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.font-mono { font-family: 'JetBrains Mono', monospace; }

/* Animated mesh gradient background */
.mesh-bg {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: 0;
  pointer-events: none;
}

.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  animation: blobFloat 20s ease-in-out infinite;
}

.mesh-blob:nth-child(1) {
  width: 600px; height: 600px;
  background: #6366f1;
  top: 10%; left: 20%;
  animation-delay: 0s;
}
.mesh-blob:nth-child(2) {
  width: 500px; height: 500px;
  background: #8b5cf6;
  top: 40%; left: 60%;
  animation-delay: -5s;
}
.mesh-blob:nth-child(3) {
  width: 400px; height: 400px;
  background: #06b6d4;
  top: 60%; left: 30%;
  animation-delay: -10s;
}
.mesh-blob:nth-child(4) {
  width: 350px; height: 350px;
  background: #f43f5e;
  top: 20%; left: 70%;
  animation-delay: -15s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(80px, -60px) scale(1.1); }
  50% { transform: translate(-40px, 80px) scale(0.9); }
  75% { transform: translate(60px, 40px) scale(1.05); }
}

/* Glass card */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.1);
}

/* Gradient text */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* CTA button */
.btn-coral {
  background: var(--gradient-coral);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-coral:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(244, 63, 94, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-ghost:hover {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
  transform: scale(1.02);
}

/* Phone mockup */
.phone-mockup {
  width: 280px;
  height: 560px;
  background: #1a1a2e;
  border-radius: 36px;
  border: 3px solid rgba(255,255,255,0.1);
  box-shadow: 0 25px 80px rgba(0,0,0,0.5), 0 0 40px rgba(99,102,241,0.15);
  overflow: hidden;
  position: relative;
  transform: perspective(800px) rotateY(-8deg) rotateX(3deg);
  transition: transform 0.5s ease;
}

.phone-mockup:hover {
  transform: perspective(800px) rotateY(-2deg) rotateX(1deg);
}

.phone-notch {
  width: 120px;
  height: 28px;
  background: #0a0a0f;
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(99,102,241,0.3); }
  50% { box-shadow: 0 0 40px rgba(99,102,241,0.6); }
}

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

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: confetti-fall 1.5s ease-in forwards;
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 3px; }

/* Toggle switch */
.toggle-switch {
  width: 48px;
  height: 26px;
  background: rgba(255,255,255,0.1);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
}

.toggle-switch.active {
  background: var(--accent-indigo);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.3s ease;
}

.toggle-switch.active::after {
  transform: translateX(22px);
}

/* Drag handle */
.drag-handle {
  cursor: grab;
  opacity: 0.4;
  transition: opacity 0.2s;
}
.drag-handle:hover { opacity: 1; }
.drag-handle:active { cursor: grabbing; }

/* SVG Chart */
.chart-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 2s ease forwards;
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

/* Profile themes */
.theme-midnight-galaxy { background: linear-gradient(180deg, #0f0c29, #302b63, #24243e) !important; }
.theme-ocean-breeze { background: linear-gradient(180deg, #0a2342, #1a5276, #2e86ab) !important; }
.theme-sunset-coral { background: linear-gradient(180deg, #2d1b3d, #8b3a62, #e07a5f) !important; }
.theme-minimal-white { background: #f5f5f7 !important; color: #1a1a2e !important; }
.theme-neon-cyberpunk { background: linear-gradient(180deg, #0a0a0a, #1a0a2e, #0a0a0a) !important; }
.theme-glassmorphism { background: linear-gradient(180deg, #1a1a2e, #2d2b55) !important; }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease infinite;
  border-radius: 8px;
}

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Nav active indicator */
.nav-active {
  position: relative;
}
.nav-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
}

/* Comparison table */
.comparison-row:nth-child(even) {
  background: rgba(255,255,255,0.02);
}

[data-theme="light"] .comparison-row:nth-child(even) {
  background: rgba(0,0,0,0.02);
}

/* Profile link card hover */
.profile-link-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.profile-link-card:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(99,102,241,0.15);
}

/* Glow ring */
@keyframes glowRing {
  0%, 100% { box-shadow: 0 0 20px rgba(99,102,241,0.4), 0 0 40px rgba(139,92,246,0.2); }
  50% { box-shadow: 0 0 30px rgba(99,102,241,0.6), 0 0 60px rgba(139,92,246,0.3); }
}

.glow-ring {
  animation: glowRing 3s ease-in-out infinite;
}

/* Mobile bottom nav */
@media (max-width: 768px) {
  .desktop-sidebar { display: none !important; }
  .mobile-bottom-nav { display: flex !important; }
}

@media (min-width: 769px) {
  .mobile-bottom-nav { display: none !important; }
}