/* BioAssayAI Global Stylesheet - style.css */
/* Consistent design system for all pages */

:root {
  /* Primary color palette - Sophisticated teal/cyan with deep blue */
  --bg: #0a1628;           /* Deep navy background */
  --panel: #0f1f3a;        /* Panel background */
  --soft: #142847;         /* Softer panel variant */
  --text: #e8f1f8;         /* Primary text color */
  --muted: #8fa7c4;        /* Muted text */
  
  /* Accent colors */
  --accent: #00d4ff;       /* Bright cyan */
  --accent-2: #00a8cc;     /* Deeper cyan */
  --accent-light: #00d4ff20; /* Light accent for backgrounds */
  --accent-border: #00d4ff30; /* Accent for borders */
  
  /* Status colors */
  --success: #10b981;      /* Success green */
  --warning: #f59e0b;      /* Warning amber */
  --danger: #ef4444;       /* Danger red */
  --info: #3b82f6;         /* Info blue */
  
  /* UI elements */
  --code: #0c1829;         /* Code block background */
  --border: #1a3555;       /* Default border color */
  --border-light: #2a4565; /* Lighter border */
  --shadow: rgba(0, 0, 0, 0.25);
  --shadow-lg: rgba(0, 0, 0, 0.35);
  
  /* Layout */
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --ring: #00d4ff40;
  --max-width: 1080px;
  
  /* Typography */
  --font-main: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --font-size: 18px;
  --line-height: 1.55;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font: 500 var(--font-size)/var(--line-height) var(--font-main);
  color: var(--text);
  background: linear-gradient(135deg, var(--bg) 0%, var(--panel) 50%, var(--bg) 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Animated background effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, var(--accent-light) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, #00a8cc08 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* Container */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px 18px 64px;
  position: relative;
  z-index: 2;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(28px, 4.2vw, 42px);
  background: linear-gradient(135deg, #ffffff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(24px, 3.5vw, 32px);
  margin-bottom: 16px;
}

h3 {
  font-size: clamp(20px, 2.8vw, 24px);
  margin-bottom: 12px;
}

p {
  margin-bottom: 16px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

/* Brand Header */
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.logo {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-light), #00a8cc20);
  border: 1px solid var(--accent-border);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.15);
  flex-shrink: 0;
}

.logo svg {
  width: 40px;
  height: 40px;
  display: block;
}

.lead {
  color: #b8d0e8;
  font-size: 18px;
  margin: 4px 0;
}

/* Cards & Panels */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 12px 28px var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

.card-soft {
  background: var(--soft);
}

.accent-border {
  border-left: 4px solid var(--accent);
  padding-left: 16px;
}

.hero {
  background: linear-gradient(135deg, var(--panel), var(--soft));
  border: 1px solid var(--accent-light);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent));
  border-radius: var(--radius);
  opacity: 0.1;
  z-index: -1;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
}

.btn-primary {
  color: #001828;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
  text-decoration: none;
}

.btn-secondary {
  color: var(--accent);
  border: 1px solid var(--accent);
  background: transparent;
}

.btn-secondary:hover {
  background: var(--accent);
  color: #001828;
  text-decoration: none;
}

.btn-ghost {
  color: var(--text);
  background: var(--soft);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--border);
  border-color: var(--accent);
  text-decoration: none;
}

.btn-small {
  padding: 10px 16px;
  font-size: 14px;
}

/* Forms & Inputs */
.input,
input[type="text"],
input[type="email"],
textarea,
select {
  background: var(--code);
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: var(--font-size);
  font-family: var(--font-main);
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

.input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* Pills/Tags */
.pill {
  display: inline-block;
  background: var(--border);
  border: 1px solid var(--border-light);
  color: #ffffff;
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill:hover {
  background: var(--border-light);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
  transform: translateY(-1px);
}

.pill:active {
  transform: translateY(0);
}

/* Code Blocks */
pre,
code {
  font-family: var(--font-mono);
  background: var(--code);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
}

code {
  padding: 2px 6px;
  font-size: 14px;
  display: inline-block;
}

pre {
  padding: 16px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.5;
}

pre code {
  padding: 0;
  border: none;
  background: transparent;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--soft);
  font-weight: 600;
  color: var(--accent);
}

tr:hover {
  background: var(--soft);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 20px;
  margin: 20px 0;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Feature Cards */
.feature-card {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  background: var(--border);
  border-color: var(--accent);
  transform: translateY(-3px);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  margin-bottom: 12px;
  font-size: 20px;
}

/* Stats */
.stat {
  text-align: center;
  padding: 16px;
  background: var(--soft);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* Badges */
.badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #001828;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Alerts */
.alert {
  padding: 16px;
  border-radius: 12px;
  margin: 16px 0;
  border: 1px solid;
}

.alert-info {
  background: #3b82f610;
  border-color: #3b82f640;
  color: #93c5fd;
}

.alert-success {
  background: #10b98110;
  border-color: #10b98140;
  color: #86efac;
}

.alert-warning {
  background: #f59e0b10;
  border-color: #f59e0b40;
  color: #fcd34d;
}

.alert-danger {
  background: #ef444410;
  border-color: #ef444440;
  color: #fca5a5;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.flex-1 { flex: 1; }

/* Footer */
.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.footer a {
  color: var(--accent);
  margin: 0 8px;
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .wrap {
    padding: 20px 16px 48px;
  }
  
  .brand {
    flex-direction: column;
    text-align: center;
  }
  
  h1 {
    font-size: 32px;
  }
  
  h2 {
    font-size: 24px;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .row {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  table {
    font-size: 14px;
  }
  
  th, td {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  
  .card {
    padding: 16px;
  }
  
  .stat-value {
    font-size: 24px;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .card {
    border: 1px solid #ccc;
    box-shadow: none;
  }
  
  .btn,
  .pill {
    display: none;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-2);
}

/* Selection colors */
::selection {
  background: var(--accent);
  color: var(--bg);
}

::-moz-selection {
  background: var(--accent);
  color: var(--bg);
}