/* /assets/css/style.css - AlleleAI Enhanced Stylesheet */

/* ============================================
   CSS Variables & Theme
   ============================================ */
:root {
  /* Color Palette - Genomics-inspired blue-green theme */
  --bg-primary: #F0F9FF;        /* Light sky blue background */
  --bg-secondary: #E0F2FE;       /* Slightly deeper blue */
  --bg-white: #FFFFFF;
  --bg-dark: #0F172A;
  
  /* Brand Colors */
  --brand-primary: #0EA5E9;     /* Sky blue */
  --brand-secondary: #0284C7;    /* Deeper sky blue */
  --brand-accent: #06B6D4;       /* Cyan */
  --brand-dark: #0369A1;         /* Dark blue */
  
  /* Text Colors */
  --text-primary: #1E293B;       /* Slate 800 */
  --text-secondary: #475569;     /* Slate 600 */
  --text-muted: #64748B;         /* Slate 500 */
  --text-light: #94A3B8;         /* Slate 400 */
  
  /* Status Colors */
  --success: #10B981;            /* Emerald */
  --warning: #F59E0B;            /* Amber */
  --danger: #EF4444;             /* Red */
  --info: #3B82F6;               /* Blue */
  
  /* Borders & Shadows */
  --border: #E2E8F0;             /* Slate 200 */
  --border-light: #F1F5F9;       /* Slate 100 */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 25px 50px rgba(15, 23, 42, 0.15);
  
  /* Typography - Using Inter for better readability */
  --font-primary: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  /* Font Sizes - Increased for better readability */
  --text-xs: 0.875rem;    /* 14px */
  --text-sm: 1rem;        /* 16px */
  --text-base: 1.125rem;  /* 18px */
  --text-lg: 1.25rem;     /* 20px */
  --text-xl: 1.5rem;      /* 24px */
  --text-2xl: 1.875rem;   /* 30px */
  --text-3xl: 2.25rem;    /* 36px */
  --text-4xl: 3rem;       /* 48px */
  
  /* Spacing */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 20px;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Global Styles
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 { font-size: var(--text-4xl); font-weight: 900; }
h2 { font-size: var(--text-3xl); font-weight: 800; }
h3 { font-size: var(--text-2xl); font-weight: 700; }
h4 { font-size: var(--text-xl); font-weight: 600; }
h5 { font-size: var(--text-lg); font-weight: 600; }
h6 { font-size: var(--text-base); font-weight: 600; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--brand-secondary);
}

strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   Layout Components
   ============================================ */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: 48px;
}

.brand h1 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.menu {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.menu a {
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: var(--transition);
}

.menu a:hover,
.menu a.active {
  background: linear-gradient(135deg, #E0F2FE, #BAE6FD);
  color: var(--brand-primary);
}

.menu-btn {
  display: none;
  padding: 0.625rem 1.25rem;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

/* Mobile Drawer */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: 85vw;
  max-width: 320px;
  transform: translateX(100%);
  background: var(--bg-white);
  box-shadow: var(--shadow-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 200;
}

.drawer.open {
  transform: translateX(0);
}

.drawer a {
  padding: 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
}

.drawer a:hover {
  background: var(--bg-primary);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 150;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   Hero Sections
   ============================================ */
.hero {
  padding: 3rem 0;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: white;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  max-width: 800px;
  margin: 0 auto;
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Stats Row */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--brand-primary);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-border {
  position: relative;
  background: var(--bg-white);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  z-index: -1;
}

/* ============================================
   Buttons & Forms
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

.btn-gradient {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn-gradient:hover::before {
  left: 100%;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--brand-primary);
  color: var(--brand-primary);
}

.btn-outline:hover {
  background: var(--brand-primary);
  color: white;
}

.btn-large {
  padding: 1.125rem 2.25rem;
  font-size: var(--text-lg);
}

/* Form Elements */
input, textarea, select {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-family: var(--font-primary);
  background: var(--bg-white);
  transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, #E0F2FE, #BAE6FD);
  border: 2px solid var(--brand-primary);
  border-radius: 999px;
  color: var(--brand-primary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.pill:hover {
  background: var(--brand-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.pill-icon {
  font-size: 1.25rem;
}

.pill-tag {
  padding: 0.25rem 0.5rem;
  background: var(--brand-primary);
  color: white;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
}

/* ============================================
   Features Grid
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-card {
  background: var(--bg-white);
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h4 {
  margin-bottom: 0.75rem;
}

.feature-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.feature-stats span {
  padding: 0.25rem 0.75rem;
  background: var(--bg-primary);
  color: var(--brand-primary);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
}

/* ============================================
   Tables
   ============================================ */
.data-table, .params-table, .config-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
}

.data-table th, .params-table th, .config-table th {
  background: linear-gradient(135deg, #E0F2FE, #BAE6FD);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
}

.data-table td, .params-table td, .config-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* ============================================
   Code Blocks
   ============================================ */
code, kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.25rem 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--brand-primary);
}

pre, .code-block, .code-output {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
  background: #1E293B;
  color: #E2E8F0;
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* ============================================
   Banners & Alerts
   ============================================ */
.banner {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: white;
  text-align: center;
  padding: 1rem;
  font-weight: 600;
}

.gradient-banner {
  position: relative;
  overflow: hidden;
}

.gradient-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  margin-right: 0.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Alert Cards */
.alert-card {
  background: #FEF2F2;
  border: 2px solid var(--danger);
  border-radius: var(--radius);
}

.alert-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #FEE2E2, #FECACA);
  border-bottom: 2px solid var(--danger);
}

.alert-icon {
  font-size: 2rem;
}

.critical-banner {
  background: linear-gradient(135deg, #FEE2E2, #FCA5A5);
  color: white;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.emergency-card {
  background: #FEE2E2;
  border: 3px solid var(--danger);
}

/* ============================================
   API Documentation Styles
   ============================================ */
.endpoint-section {
  background: var(--bg-primary);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
  border: 1px solid var(--border);
}

.endpoint-url {
  background: var(--bg-dark);
  color: var(--brand-accent);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  margin: 1rem 0;
}

.api-version-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--success);
  color: white;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-section h5 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--brand-primary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
  color: var(--text-muted);
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Live Indicator */
.live-indicator {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--success);
  color: white;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  margin-right: 0.5rem;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 900px) {
  .menu {
    display: none;
  }
  
  .menu-btn {
    display: block;
    margin-left: auto;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-row {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
  }
  
  .wrap {
    padding: 1.5rem 1rem 3rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .btn {
    width: 100%;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.p-0 { padding: 0; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }
.gap-2 { gap: 2rem; }
.w-full { width: 100%; }