/* FontVibe Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;800&family=Syne:wght@700;800&family=Orbitron:wght@500;800&family=Press+Start+2P&family=Playfair+Display:ital,wght@0,600;1,600&display=swap');

:root {
  /* Dark Theme Default */
  --bg-dark: #050508;
  --bg-card: rgba(13, 13, 20, 0.6);
  --bg-card-hover: rgba(22, 22, 33, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-neon: rgba(139, 92, 246, 0.3);
  
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-pink: #ec4899;
  
  --purple-glow: rgba(139, 92, 246, 0.25);
  --blue-glow: rgba(59, 130, 246, 0.25);
  --pink-glow: rgba(236, 72, 153, 0.25);
  
  --text-primary: #f3f4f6;
  --text-muted: #9ca3af;
  --text-inverted: #030303;
  
  --navbar-bg: rgba(5, 5, 8, 0.75);
  
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-logo: 'Syne', -apple-system, sans-serif;
  --font-body: 'Inter', sans-serif;
}

.light-theme {
  /* Light Theme Toggle */
  --bg-dark: #fafafc;
  --bg-card: rgba(240, 240, 246, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-neon: rgba(139, 92, 246, 0.15);
  
  --purple-glow: rgba(139, 92, 246, 0.1);
  --blue-glow: rgba(59, 130, 246, 0.1);
  --pink-glow: rgba(236, 72, 153, 0.1);
  
  --text-primary: #111827;
  --text-muted: #4b5563;
  --text-inverted: #f9fafb;
  
  --navbar-bg: rgba(250, 250, 252, 0.8);
}

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

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

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--border-neon);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-neon);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px 0 rgba(139, 92, 246, 0.1);
}

/* Gradient Typography */
.grad-text {
  background: linear-gradient(135deg, #ffffff 0%, #b0b0b0 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.grad-neon {
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: hueRotate 10s infinite linear;
}

/* Floating Blobs Background */
.blob-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.45;
  mix-blend-mode: screen;
  animation: floatAround 25s infinite alternate ease-in-out;
  pointer-events: none;
}

.light-theme .blob {
  opacity: 0.15;
  mix-blend-mode: multiply;
}

.blob-purple {
  background: var(--accent-purple);
  width: 450px;
  height: 450px;
  top: 15%;
  left: 10%;
  animation-duration: 30s;
}

.blob-blue {
  background: var(--accent-blue);
  width: 500px;
  height: 500px;
  bottom: 10%;
  right: 15%;
  animation-duration: 25s;
  animation-delay: -5s;
}

.blob-pink {
  background: var(--accent-pink);
  width: 350px;
  height: 350px;
  top: 50%;
  left: 60%;
  animation-duration: 20s;
  animation-delay: -10s;
}

/* Animated Particles */
.particle {
  position: absolute;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.15;
}

/* Keyframes */
@keyframes floatAround {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(80px, -60px) scale(1.15) rotate(180deg);
  }
  100% {
    transform: translate(-50px, 80px) scale(0.9) rotate(360deg);
  }
}

@keyframes hueRotate {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

@keyframes glitch {
  0% {
    text-shadow: 2px -2px 0 var(--accent-blue), -2px 2px 0 var(--accent-pink);
  }
  25% {
    text-shadow: -2px 2px 0 var(--accent-blue), 2px -2px 0 var(--accent-pink);
  }
  50% {
    text-shadow: 2px 2px 0 var(--accent-blue), -2px -2px 0 var(--accent-pink);
  }
  75% {
    text-shadow: -2px -2px 0 var(--accent-blue), 2px 2px 0 var(--accent-pink);
  }
  100% {
    text-shadow: 2px -2px 0 var(--accent-blue), -2px 2px 0 var(--accent-pink);
  }
}

/* Apple-style Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-family: var(--font-title);
  cursor: pointer;
  box-shadow: 0 4px 15px var(--purple-glow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--purple-glow), 0 0 0 2px var(--accent-purple);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-muted);
}

/* Custom Grid Utility */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

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

/* CSS specific font previews definitions */
.font-preview-orbitron {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 2px;
}

.font-preview-gothic {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.3rem;
}

.font-preview-cursive {
  font-family: 'Sacramento', cursive;
  font-size: 1.5rem;
}

.font-preview-pixel {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
}

/* Typing Sparks Particle */
.spark-particle {
  position: absolute;
  pointer-events: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  z-index: 1000;
  animation: sparkUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes sparkUp {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--x), var(--y)) scale(0.2);
    opacity: 0;
  }
}

/* Switches & Toggles */
.glass-switch-container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid var(--border-color) !important;
  padding: 6px 12px !important;
  border-radius: 20px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  font-family: var(--font-title) !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
.glass-switch-container.active {
  background: rgba(139, 92, 246, 0.08) !important;
  border-color: var(--accent-purple) !important;
  color: var(--text-primary) !important;
}
.glass-switch-container svg,
.glass-switch-container i {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* Smart Tags Auto-Complete */
.tag-suggestion-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.tag-suggestion-pill:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

/* Social Bio Builder Mockup Frame */
.bio-mock-phone {
  background: #0d0d12;
  border: 8px solid rgba(255, 255, 255, 0.05);
  border-radius: 36px;
  padding: 16px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
}
.light-theme .bio-mock-phone {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}
.bio-mock-phone::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 18px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.light-theme .bio-mock-phone::before {
  background: rgba(0, 0, 0, 0.05);
}

/* Logo Exporter Modal Overlay */
.logo-sandbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.logo-sandbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.logo-sandbox-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: 24px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 20px 60px var(--purple-glow);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.logo-sandbox-overlay.open .logo-sandbox-modal {
  transform: scale(1);
}
.logo-sandbox-canvas {
  background: #050508;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}
.light-theme .logo-sandbox-canvas {
  background: #ffffff;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

/* Wrapper Select Pill */
.wrapper-select-pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-title);
}
.wrapper-select-pill.active {
  background: rgba(139, 92, 246, 0.12);
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

/* Copy History Drawer list */
.history-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.history-item-row:hover {
  border-color: var(--border-neon);
}

/* Responsive Grid for Generator layout columns */
.generator-cols-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 992px) {
  .generator-cols-container {
    grid-template-columns: 1fr;
  }
}


