/* Professional Spider AI Theme - System Architecture Animations */
/* Consistent design system for all animation files */

:root {
  /* Godfather Brand Colors */
  --spider-primary: #d4af37;   /* Gold */
  --spider-secondary: #b8860b; /* Darker gold */
  --spider-accent: #7a1f1f;    /* Deep crimson */
  --spider-warning: #d4af37;
  --spider-error: #b91c1c;
  --spider-success: #8c7a3f;   /* Olive-gold */

  /* Background System */
  --bg-space: #0b0b0b;
  --bg-deep: #141111;
  --bg-surface: #1c1613;
  --bg-panel: rgba(26, 20, 17, 0.95);
  --bg-overlay: rgba(20, 17, 17, 0.9);

  /* Text System */
  --text-primary: #f3efe2;   /* Ivory */
  --text-secondary: #d9d2c4;
  --text-muted: #b3aa9a;
  --text-accent: #d4af37;

  /* Border System */
  --border-subtle: #3a2f1c;
  --border-default: #4a3b22;
  --border-accent: #d4af37;

  /* Shadow System */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.6);

  /* Data Flow Colors */
  --flow-input: #3b82f6;
  --flow-process: #10b981;
  --flow-memory: #8b5cf6;
  --flow-engine: #f59e0b;
  --flow-output: #06b6d4;

  /* Status Colors */
  --status-active: rgba(16, 185, 129, 0.2);
  --status-processing: rgba(245, 158, 11, 0.2);
  --status-inactive: rgba(107, 114, 128, 0.2);
  --status-error: rgba(239, 68, 68, 0.2);
}

/* Typography Scale */
.spider-heading-xl {
  font: 800 32px/1.1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.spider-heading-lg {
  font: 700 24px/1.2 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.spider-heading-md {
  font: 600 18px/1.3 ui-sans-serif, system-ui, sans-serif;
  color: var(--text-primary);
}

.spider-body-lg {
  font: 400 16px/1.5 ui-sans-serif, system-ui, sans-serif;
  color: var(--text-secondary);
}

.spider-body-md {
  font: 400 14px/1.4 ui-sans-serif, system-ui, sans-serif;
  color: var(--text-secondary);
}

.spider-body-sm {
  font: 400 12px/1.4 ui-sans-serif, system-ui, sans-serif;
  color: var(--text-muted);
}

.spider-caption {
  font: 500 11px/1.3 ui-sans-serif, system-ui, sans-serif;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Component Styles */
.spider-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.spider-card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.spider-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-accent);
}

.spider-button-primary {
  background: linear-gradient(135deg, var(--spider-primary), var(--spider-secondary));
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font: 600 14px/1.2 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
}

.spider-button-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.1);
}

.spider-button-secondary {
  background: var(--bg-overlay);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 10px 20px;
  font: 500 14px/1.2 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.spider-button-secondary:hover {
  background: var(--bg-surface);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

/* Status Indicators */
.spider-status-active {
  background: var(--status-active);
  color: var(--spider-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.spider-status-processing {
  background: var(--status-processing);
  color: var(--spider-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.spider-status-inactive {
  background: var(--status-inactive);
  color: var(--text-muted);
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.spider-status-error {
  background: var(--status-error);
  color: var(--spider-error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Data Flow Visualization */
.spider-data-flow {
  position: relative;
  overflow: hidden;
}

.spider-data-flow::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.1), transparent);
  animation: dataFlow 3s infinite;
}

@keyframes dataFlow {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Loading States */
.spider-loading {
  position: relative;
  overflow: hidden;
}

.spider-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--spider-primary), var(--spider-accent));
  animation: loadingProgress 2s ease-in-out infinite;
}

@keyframes loadingProgress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Professional Animations */
@keyframes spiderFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spiderSlideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.spider-animate-fade-in {
  animation: spiderFadeIn 0.6s ease-out;
}

.spider-animate-slide-in {
  animation: spiderSlideIn 0.5s ease-out;
}

/* HUD Styles */
.spider-hud {
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 16px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-lg);
  font: 500 12px/1.4 ui-sans-serif, system-ui, sans-serif;
}

.spider-hud-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.spider-hud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: spiderPulse 2s infinite;
}

@keyframes spiderPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .spider-heading-xl { font-size: 28px; }
  .spider-heading-lg { font-size: 20px; }
  .spider-heading-md { font-size: 16px; }

  .spider-card {
    border-radius: 8px;
  }

  .spider-button-primary,
  .spider-button-secondary {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States */
.spider-focus:focus-visible {
  outline: 2px solid var(--spider-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Dark Mode (Default) - Light mode can be added later if needed */
@media (prefers-color-scheme: light) {
  /* Future light mode styles can go here */
}
