/* ============================================
   VAICEIQ HELPER PORTAL - Design System
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ============================================
   CSS Variables - Color Palette
   ============================================ */
:root {
  /* Primary Colors */
  --color-primary: hsl(220, 100%, 60%);
  --color-primary-light: hsl(220, 100%, 70%);
  --color-primary-dark: hsl(220, 100%, 45%);
  
  /* Accent Colors */
  --color-accent: hsl(280, 100%, 65%);
  --color-accent-light: hsl(280, 100%, 75%);
  --color-accent-cyan: hsl(180, 100%, 50%);
  
  /* Status Colors */
  --color-success: hsl(145, 80%, 50%);
  --color-warning: hsl(45, 100%, 55%);
  --color-error: hsl(0, 85%, 60%);
  
  /* Background Colors */
  --bg-primary: hsl(225, 25%, 8%);
  --bg-secondary: hsl(225, 25%, 12%);
  --bg-tertiary: hsl(225, 25%, 16%);
  --bg-card: hsla(225, 25%, 15%, 0.6);
  --bg-glass: hsla(225, 25%, 20%, 0.3);
  
  /* Text Colors */
  --text-primary: hsl(0, 0%, 98%);
  --text-secondary: hsl(220, 15%, 70%);
  --text-muted: hsl(220, 15%, 50%);
  
  /* Borders */
  --border-subtle: hsla(220, 30%, 50%, 0.15);
  --border-glass: hsla(220, 50%, 70%, 0.1);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  --gradient-hero: linear-gradient(180deg, 
    hsla(225, 30%, 8%, 0) 0%, 
    hsla(225, 30%, 8%, 0.8) 50%,
    hsl(225, 30%, 8%) 100%
  );
  --gradient-glow: radial-gradient(ellipse at center, 
    hsla(220, 100%, 60%, 0.15) 0%, 
    transparent 70%
  );
  
  /* Shadows */
  --shadow-sm: 0 2px 8px hsla(0, 0%, 0%, 0.3);
  --shadow-md: 0 4px 16px hsla(0, 0%, 0%, 0.4);
  --shadow-lg: 0 8px 32px hsla(0, 0%, 0%, 0.5);
  --shadow-glow: 0 0 40px hsla(220, 100%, 60%, 0.3);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', var(--font-primary);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Z-Index Scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 500;
  --z-tooltip: 1000;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-display {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
}

.text-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

.text-body-lg {
  font-size: 1.125rem;
  line-height: 1.7;
}

.text-body {
  font-size: 1rem;
  line-height: 1.6;
}

.text-small {
  font-size: 0.875rem;
  line-height: 1.5;
}

.text-muted {
  color: var(--text-secondary);
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   Layout Utilities
   ============================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-sm {
  max-width: 800px;
}

.container-lg {
  max-width: 1440px;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ============================================
   Glassmorphism Card
   ============================================ */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.glass-card-hover {
  transition: transform var(--transition-base), 
              box-shadow var(--transition-base),
              border-color var(--transition-base);
}

.glass-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: hsla(220, 100%, 60%, 0.3);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    hsla(255, 255, 255, 0.2) 0%, 
    transparent 50%
  );
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md), 
              0 0 20px hsla(220, 100%, 60%, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 
              0 0 40px hsla(220, 100%, 60%, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: hsla(220, 30%, 30%, 0.4);
  border-color: var(--color-primary);
}

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1.125rem;
}

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
}

/* ============================================
   Form Elements
   ============================================ */
.input-group {
  position: relative;
}

.input {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-base);
}

.input::placeholder {
  color: var(--text-muted);
}

.input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px hsla(220, 100%, 60%, 0.2);
}

.textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   Status Indicators
   ============================================ */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: var(--radius-full);
  animation: pulse 2s ease-in-out infinite;
}

.status-dot.connected {
  background: var(--color-success);
}

.status-dot.connected::after {
  background: hsla(145, 80%, 50%, 0.4);
}

.status-dot.disconnected {
  background: var(--color-error);
}

.status-dot.connecting {
  background: var(--color-warning);
  animation: blink 1s ease-in-out infinite;
}

/* ============================================
   Animations
   ============================================ */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes glow {
  0%, 100% { opacity: 0.5; filter: blur(40px); }
  50% { opacity: 0.8; filter: blur(60px); }
}

@keyframes slideUp {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { 
    opacity: 0; 
    transform: scale(0.9); 
  }
  to { 
    opacity: 1; 
    transform: scale(1); 
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-glow {
  animation: glow 4s ease-in-out infinite;
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out forwards;
}

/* Animation Delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive Breakpoints
   ============================================ */
@media (max-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 3rem;
  }
  
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .hide-mobile {
    display: none !important;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: hsla(220, 30%, 40%, 1);
}

/* ============================================
   Selection Styling
   ============================================ */
::selection {
  background: hsla(220, 100%, 60%, 0.3);
  color: var(--text-primary);
}
