/* ============================================================
   PDF417 GEN - Main CSS (Fixed)
   All design tokens, shared layout, navbar, loading screen,
   animated background, and component styles
   ============================================================ */

/* ============================================================
   DESIGN TOKENS (CSS Custom Properties)
   ============================================================ */

:root {
  /* Core accent colors */
  --accent: #00ff88;
  --accent-primary: #00ff88;
  --accent-2: #00ccff;
  --accent-secondary: #00ccff;
  --accent-3: #ff006e;

  /* Backgrounds */
  --bg-primary: #070b14;
  --bg-card: #0d1225;
  --bg-secondary: #0f1529;
  --bg-hover: rgba(255, 255, 255, 0.04);
  --bg-input: rgba(255, 255, 255, 0.05);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --text-muted: #4a5568;
  --text-accent: #00ff88;

  /* Borders & shadows */
  --border-color: rgba(0, 255, 136, 0.2);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(0, 255, 136, 0.15);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #00ff88 0%, #00ccff 100%);

  /* Border radii */
  --radius: 12px;
  --radius-sm: 8px;

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --accent: #0066ff;
  --accent-primary: #0066ff;
  --accent-2: #00a8ff;
  --accent-secondary: #00a8ff;
  --accent-3: #ff1744;

  --bg-primary: #f5f7fa;
  --bg-card: #ffffff;
  --bg-secondary: #f0f4f8;
  --bg-hover: rgba(0, 0, 0, 0.03);
  --bg-input: rgba(0, 0, 0, 0.04);

  --text-primary: #0a0e1a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-accent: #0066ff;

  --border-color: rgba(0, 102, 255, 0.15);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 30px rgba(0, 102, 255, 0.12);

  --gradient-primary: linear-gradient(135deg, #0066ff 0%, #00a8ff 100%);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================================
   ANIMATED BACKGROUND LAYERS
   ============================================================ */

/* Particle network canvas (app-particles.js) */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   LAYOUT
   ============================================================ */

/* Page wrapper sits above background layers */
.page-wrapper {
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.5s ease-out;
}



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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Ensure nav, footer also above background */
.navbar,
nav,
footer {
  position: relative;
  z-index: 10;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-sm {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-logo {
  font-size: 2rem;
  font-weight: 900;
  font-family: var(--font-mono);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.1em;
}

.loading-bar {
  width: 200px;
  height: 3px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
  animation: loadingProgress 1.2s ease forwards;
}

@keyframes loadingProgress {
  from { width: 0; }
  to { width: 100%; }
}

/* ============================================================
   NAVIGATION (new class names: .navbar, .nav-brand, etc.)
   ============================================================ */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s ease;
  overflow: visible;
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.85);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  letter-spacing: 0.02em;
}

.nav-brand:hover {
  color: var(--accent-primary);
}

.logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 8px;
  font-weight: 900;
  color: #000;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active {
  background: rgba(0, 0, 0, 0.05);
}

.nav-links a.active {
  color: var(--accent-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Auth buttons in nav */
.btn-nav-login {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.btn-nav-login:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-nav-signup {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  background: var(--gradient-primary);
  color: #000;
  transition: var(--transition);
}

.btn-nav-signup:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 255, 136, 0.3);
  color: #000;
}

[data-theme="light"] .btn-nav-signup:hover {
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.25);
}

/* User menu in nav */
.nav-user-menu {
  position: relative;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.nav-user-btn:hover {
  background: rgba(0, 255, 136, 0.15);
}

.nav-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.7rem;
  color: #000;
  flex-shrink: 0;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 8px 0;
  min-width: 200px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 1000;
  animation: slideDown 0.2s ease;
}

.nav-dropdown.open {
  display: block;
}

.nav-dropdown-header {
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 4px;
}

.nav-dropdown-item {
  display: block;
  width: 100%;
  padding: 9px 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
  text-decoration: none;
  font-family: var(--font-main);
}

.nav-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-dropdown-item.danger:hover {
  color: #ff4466;
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 4px 6px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  width: 64px;
  height: 30px;
  flex-shrink: 0;
}

.toggle-icons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.7rem;
  pointer-events: none;
  padding: 0 2px;
}

.toggle-thumb {
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--gradient-primary);
  border-radius: 50%;
  top: 3px;
  left: 4px;
  transition: transform 0.3s ease;
}

[data-theme="light"] .toggle-thumb {
  transform: translateX(32px);
}

/* ============================================================
   SECTION LAYOUT HELPERS
   ============================================================ */

.section {
  padding: 50px 20px;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

[data-theme="light"] .section-tag {
  background: rgba(0, 102, 255, 0.06);
  border-color: rgba(0, 102, 255, 0.15);
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-primary);
}

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }

p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-secondary);
}

/* Smooth page transitions on link clicks */
a[href^="pages/"],
a[href^="../"],
a[href="index.html"] {
  position: relative;
}

.text-mono {
  font-family: var(--font-mono);
}

.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-main);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #000;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 255, 136, 0.3);
  color: #000;
}

[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 12px 35px rgba(0, 102, 255, 0.25);
}

.btn-secondary {
  background: rgba(0, 255, 136, 0.08);
  color: var(--accent-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(0, 255, 136, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

[data-theme="light"] .btn-secondary {
  background: rgba(0, 102, 255, 0.06);
  color: var(--accent-primary);
}

.btn-ghost {
  background: none;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-danger {
  background: rgba(255, 68, 102, 0.1);
  color: #ff4466;
  border: 1px solid rgba(255, 68, 102, 0.2);
}

.btn-danger:hover {
  background: rgba(255, 68, 102, 0.2);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 0.95rem;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.w-full { width: 100%; }

/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge-success {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.25);
  color: #00ff88;
}

.badge-info {
  background: rgba(0, 204, 255, 0.1);
  border: 1px solid rgba(0, 204, 255, 0.25);
  color: #00ccff;
}

.badge-warning {
  background: rgba(255, 200, 0, 0.1);
  border: 1px solid rgba(255, 200, 0, 0.25);
  color: #ffc800;
}

.badge-danger {
  background: rgba(255, 68, 102, 0.1);
  border: 1px solid rgba(255, 68, 102, 0.25);
  color: #ff4466;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  animation: fadeInUp 0.5s ease-out;
}

.card:hover {
  border-color: rgba(0, 255, 136, 0.35);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.07);
}

[data-theme="light"] .card:hover {
  border-color: rgba(0, 102, 255, 0.25);
  box-shadow: 0 0 30px rgba(0, 102, 255, 0.06);
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */

.form-group {
  margin-bottom: 18px;
}

label,
.form-label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

/* Input wrapper with icon */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 1;
}

.input-action {
  position: absolute;
  right: 12px;
  font-size: 0.9rem;
  cursor: pointer;
  z-index: 1;
  user-select: none;
}

input,
textarea,
select,
.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.input-wrapper input,
.input-wrapper .form-control {
  padding-left: 38px;
}

.input-wrapper .input-action ~ input,
.input-wrapper .input-action ~ .form-control {
  padding-right: 38px;
}

input::placeholder,
textarea::placeholder,
.form-control::placeholder {
  color: var(--text-muted);
}

input:focus,
textarea:focus,
select:focus,
.form-control:focus {
  border-color: var(--accent-primary);
  background: rgba(0, 255, 136, 0.04);
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus,
[data-theme="light"] .form-control:focus {
  background: rgba(0, 102, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  margin-right: 8px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Form validation error */
.form-error {
  font-size: 0.78rem;
  color: #ff4466;
  margin-top: 5px;
  display: none;
}

.form-error.visible {
  display: block;
}

/* Alert blocks */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.alert-info {
  background: rgba(0, 204, 255, 0.08);
  border: 1px solid rgba(0, 204, 255, 0.2);
  color: var(--accent-secondary);
}

.alert-success {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.2);
  color: var(--accent-primary);
}

.alert-error {
  background: rgba(255, 68, 102, 0.08);
  border: 1px solid rgba(255, 68, 102, 0.2);
  color: #ff4466;
}

/* Auth success card */
.auth-success {
  text-align: center;
  padding: 1rem 0;
}

.auth-success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.auth-terms {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.auth-terms a {
  color: var(--accent-primary);
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--text-primary);
}

/* Strength text */
.strength-text {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast,
.toast-success,
.toast-error,
.toast-info,
.toast-warning {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  min-width: 280px;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s ease;
  box-shadow: var(--shadow);
  color: var(--text-primary);
  font-size: 0.875rem;
}

.toast-success { border-left: 4px solid var(--accent-primary); }
.toast-error   { border-left: 4px solid #ff4466; }
.toast-info    { border-left: 4px solid var(--accent-secondary); }
.toast-warning { border-left: 4px solid #ffc800; }

/* Legacy class names */
.toast.success { border-left: 4px solid var(--accent-primary); }
.toast.error   { border-left: 4px solid #ff4466; }
.toast.info    { border-left: 4px solid var(--accent-secondary); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: rgba(17, 24, 39, 0.8);
  border-top: 1px solid var(--border-color);
  padding: 48px 20px 32px;
  position: relative;
  z-index: 1;
}

[data-theme="light"] .footer {
  background: rgba(240, 244, 248, 0.9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  max-width: 280px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col ul li a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ============================================================
   ANIMATIONS & KEYFRAMES
   ============================================================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.05); }
  50%       { box-shadow: 0 0 40px rgba(0, 255, 136, 0.12); }
}

@keyframes scanLine {
  0%   { top: 0; }
  100% { top: 100%; }
}

/* Scan line on barcode preview */
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.8), transparent);
  animation: scanLine 2s ease-in-out infinite;
  pointer-events: none;
}

/* Stagger children animation */
.stagger-children > * {
  animation: fadeInUp 0.5s ease both;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease both;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.hidden { display: none !important; }
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mb-3 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1.5rem; }

/* ============================================================
   MOBILE NAV
   ============================================================ */

body.nav-mobile-open .nav-links {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  z-index: 99;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .navbar {
    padding: 14px 20px;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }

  .section { padding: 60px 16px; }

  .toast {
    min-width: 250px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 24px; }

  .navbar {
    padding: 12px 16px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
}
