@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  
  /* Light Theme */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-sidebar: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #38bdf8;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(226, 232, 240, 0.8);
  
  /* Success, Warning, Error Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
}

.dark {
  /* Dark Theme */
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-sidebar: #090d16;
  --sidebar-hover: #1e293b;
  --sidebar-active: #38bdf8;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-color: #1e293b;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  
  --card-bg: rgba(15, 23, 42, 0.6);
  --card-border: rgba(30, 41, 59, 0.8);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.04);
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.02);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 9999px;
  opacity: 0.3;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Page transitions */
.fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scanning Success Animation Card */
@keyframes successPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.animate-success-pulse {
  animation: successPulse 1.2s infinite;
}

/* Scanning Error Shake */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
  20%, 40%, 60%, 80% { transform: translateX(6px); }
}

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

/* Loading skeleton styles */
.skeleton {
  background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-primary) 50%, var(--border-color) 75%);
  background-size: 200% 100%;
  animation: loading-skeleton 1.5s infinite;
}

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

/* Scanner Input Glow Effect */
.scanner-glow-active {
  box-shadow: 0 0 15px 2px rgba(59, 130, 246, 0.5);
  border-color: rgba(59, 130, 246, 0.8) !important;
}

.scanner-glow-success {
  box-shadow: 0 0 20px 4px rgba(16, 185, 129, 0.6);
  border-color: rgba(16, 185, 129, 0.9) !important;
}

.scanner-glow-warning {
  box-shadow: 0 0 20px 4px rgba(245, 158, 11, 0.6);
  border-color: rgba(245, 158, 11, 0.9) !important;
}

.scanner-glow-error {
  box-shadow: 0 0 20px 4px rgba(239, 68, 68, 0.6);
  border-color: rgba(239, 68, 68, 0.9) !important;
}
