:root {
  --purple-primary: #8B5CF6;
  --purple-deep: #6B21A8;
  --cyan-primary: #06B6D4;
  --cyan-glow: #22D3EE;
  --bg-dark: #0A0A0F;
  --bg-card: rgba(255, 255, 255, 0.03);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg-dark);
  color: #fff;
  overflow-x: hidden;
}

.dark-theme {
  background: linear-gradient(135deg, #0A0A0F 0%, #1A0A2E 50%, #0F172A 100%);
}

.light-theme {
  background: linear-gradient(135deg, #F8FAFC 0%, #E0E7FF 50%, #CFFAFE 100%);
}

.light-theme .glass-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(139, 92, 246, 0.2);
}

.light-theme .text-white {
  color: #1E293B;
}

.light-theme .text-gray-400,
.light-theme .text-gray-500 {
  color: #64748B;
}

.font-display {
  font-family: 'Space Grotesk', sans-serif;
}

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

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--purple-primary) 0%, var(--cyan-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

/* Particles */
.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 20s infinite ease-in-out;
}

.particle-1 {
  width: 400px;
  height: 400px;
  background: var(--purple-primary);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.particle-2 {
  width: 300px;
  height: 300px;
  background: var(--cyan-primary);
  bottom: 20%;
  left: -100px;
  animation-delay: -7s;
}

.particle-3 {
  width: 200px;
  height: 200px;
  background: var(--purple-deep);
  top: 40%;
  right: 10%;
  animation-delay: -14s;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--purple-primary);
  top: 10%;
  left: 20%;
  animation: pulse 8s infinite ease-in-out;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--cyan-primary);
  bottom: 10%;
  right: 10%;
  animation: pulse 8s infinite ease-in-out;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(30px, -30px) rotate(5deg); }
  50% { transform: translate(-20px, 20px) rotate(-5deg); }
  75% { transform: translate(20px, 30px) rotate(3deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(1.1); }
}

/* Category Pills */
.category-pill {
  padding: 10px 20px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9CA3AF;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.category-pill:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  color: #fff;
}

.category-pill.active {
  background: linear-gradient(135deg, var(--purple-primary), var(--cyan-primary));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

/* Stat Cards */
.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple-primary), var(--cyan-primary));
}

/* Pioneer Card */
.pioneer-card {
  border: 2px solid rgba(234, 179, 8, 0.3);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.05), rgba(139, 92, 246, 0.05));
}

.pioneer-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, #EAB308, #8B5CF6);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.pioneer-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #EAB308, #F59E0B);
  color: #000;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Verified Badge */
.verified-badge {
  padding: 2px 8px;
  background: rgba(6, 182, 212, 0.2);
  color: var(--cyan-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  border-radius: 20px;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Tags */
.tag {
  padding: 4px 10px;
  background: rgba(139, 92, 246, 0.15);
  color: #C4B5FD;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Bias Meter */
.bias-meter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meter-bar {
  width: 60px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #34D399);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Buttons */
.apply-button {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--purple-primary), var(--cyan-primary));
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.apply-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.apply-button-sm {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--purple-primary), var(--cyan-primary));
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.apply-button-sm:hover {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.add-company-btn {
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--cyan-primary), var(--purple-primary));
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
}

.add-company-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.5);
}

/* Job Card Flip */
.job-card {
  perspective: 1000px;
  min-height: 220px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.job-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 16px;
}

.card-front {
  background: transparent;
}

.card-back {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Comparison Cards */
.comparison-card {
  transition: all 0.3s ease;
}

.comparison-card.ai-side {
  border-color: rgba(6, 182, 212, 0.3);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(139, 92, 246, 0.05));
}

.comparison-card:hover {
  transform: scale(1.02);
}

/* Form Input */
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--cyan-primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-input option {
  background: #1A1A2E;
  color: #fff;
}

/* Analyzing Animation */
.analyzing-spinner {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-top-color: var(--cyan-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.analyzing-bar {
  animation: progress 2.5s ease-out forwards;
}

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

@keyframes progress {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* Robot Emoji */
.robot-emoji {
  display: inline-block;
  transition: transform 0.3s ease;
}

.robot-emoji:hover {
  animation: wobble 0.5s ease;
}

@keyframes wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confetti-fall 3s ease-out forwards;
}

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

/* Line Clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .job-card {
    min-height: auto;
  }
  
  .card-inner {
    position: relative;
  }
  
  .card-front, .card-back {
    position: relative;
    backface-visibility: visible;
  }
  
  .card-back {
    display: none;
    transform: none;
  }
  
  .job-card.flipped .card-front {
    display: none;
  }
  
  .job-card.flipped .card-back {
    display: flex;
  }
  
  .job-card.flipped .card-inner {
    transform: none;
  }
}