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

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes sparkle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes vibe-pulse {
  0%, 100% { width: 95%; }
  50% { width: 100%; }
}

.header-gradient {
  background: linear-gradient(-45deg, #8B5CF6, #EC4899, #3B82F6, #8B5CF6);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

.floating-berry {
  position: absolute;
  font-size: 2rem;
  animation: float 3s ease-in-out infinite;
}

.floating-berry:nth-child(2) { left: 10%; top: 20%; }
.floating-berry:nth-child(3) { left: 80%; top: 30%; animation-delay: 0.5s; }
.floating-berry:nth-child(4) { left: 20%; top: 70%; animation-delay: 1s; }
.floating-berry:nth-child(5) { left: 70%; top: 60%; animation-delay: 1.5s; }
.floating-berry:nth-child(6) { left: 50%; top: 40%; animation-delay: 2s; }

.badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

.glass-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.gradient-text {
  background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 50%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vibe-bar {
  width: 100%;
  height: 8px;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.vibe-fill {
  height: 100%;
  background: linear-gradient(90deg, #8B5CF6, #EC4899);
  animation: vibe-pulse 2s ease-in-out infinite;
}

.sparkle {
  animation: sparkle 2s ease-in-out infinite;
}

.builder-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  perspective: 1000px;
  min-height: 140px;
}

.builder-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(139, 92, 246, 0.2);
}

.builder-card.selected {
  border-color: #8B5CF6;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
}

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

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

.card-front, .card-back {
  position: absolute;
  width: 100%;
  backface-visibility: hidden;
}

.card-back {
  transform: rotateY(180deg);
}

.toggle-switch {
  width: 48px;
  height: 24px;
  background: #e5e7eb;
  border-radius: 12px;
  position: relative;
  transition: background 0.3s;
  cursor: pointer;
}

.toggle-switch.active {
  background: linear-gradient(90deg, #8B5CF6, #EC4899);
}

.toggle-knob {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch.active .toggle-knob {
  transform: translateX(24px);
}

.vibe-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #8B5CF6, #EC4899, #3B82F6);
  outline: none;
}

.vibe-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  border: 2px solid #8B5CF6;
}

.vibe-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  border: 2px solid #8B5CF6;
}

.example-card {
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid #e5e7eb;
}

.example-card:hover {
  border-color: #8B5CF6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.action-button {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.action-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recursion-button {
  padding: 1.5rem 3rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #8B5CF6, #EC4899, #3B82F6);
  background-size: 200% 200%;
  color: white;
  border: none;
  font-size: 1.25rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 8px 16px rgba(139, 92, 246, 0.3);
  animation: gradient-shift 3s ease infinite;
}

.recursion-button:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 24px rgba(139, 92, 246, 0.4);
}

.meta-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.timeline-item {
  width: 100%;
  max-width: 500px;
}

.timeline-content {
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 2px solid #e5e7eb;
  text-align: center;
}

.timeline-content.twitter-card {
  background: #f7f9f9;
  border-color: #1DA1F2;
  text-align: left;
}

.timeline-content.highlight {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
  border-color: #8B5CF6;
  font-weight: 600;
}

.timeline-content.success {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  border-color: #3B82F6;
  font-weight: 600;
}

.timeline-arrow {
  font-size: 1.5rem;
  color: #8B5CF6;
  font-weight: bold;
}

@media (max-width: 768px) {
  .floating-berry {
    font-size: 1.5rem;
  }
  
  .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
  
  .recursion-button {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
}