/* ==========================================================================
   Peptide Research Blog - Scientific Design System & Dark/Light Theme
   ========================================================================== */

:root {
  --bg-primary: #0a0f1d;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --border-color: rgba(75, 85, 99, 0.3);
  --border-accent: rgba(14, 165, 233, 0.4);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --glow-cyan: rgba(6, 182, 212, 0.15);
  --glow-blue: rgba(59, 130, 246, 0.15);
  
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, monospace;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --border-color: rgba(226, 232, 240, 0.9);
  --border-accent: rgba(2, 132, 199, 0.3);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --glow-cyan: rgba(6, 182, 212, 0.08);
  --glow-blue: rgba(59, 130, 246, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Glassmorphism Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
}

.glass-panel:hover {
  border-color: var(--border-accent);
}

.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: inherit;
  z-index: -1;
  opacity: 0.3;
}

/* Chemical / Structure Formula Styling */
.sequence-badge {
  font-family: var(--font-mono);
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  word-break: break-all;
}

[data-theme="light"] .sequence-badge {
  background: #f1f5f9;
  border-color: #0284c7;
  color: #0369a1;
}

/* Scientific Metric Badge */
.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
}

.metric-pill.cyan { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.metric-pill.emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.metric-pill.purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.metric-pill.amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

/* Research Citation Box */
.citation-box {
  border-left: 3px solid var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
  padding: 1rem 1.25rem;
  border-radius: 0 0.75rem 0.75rem 0;
  margin: 1.5rem 0;
}

/* Disclaimer Banner */
.disclaimer-banner {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

[data-theme="light"] .disclaimer-banner {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

/* Interactive Syringe Visualizer */
.syringe-container {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 1rem;
  padding: 1.5rem;
  position: relative;
}

[data-theme="light"] .syringe-container {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.syringe-barrel {
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #475569;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  margin: 1.5rem 0 0.5rem 0;
}

.syringe-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.7) 0%, rgba(59, 130, 246, 0.9) 100%);
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

.syringe-ticks {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  pointer-events: none;
}

.tick {
  width: 1px;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
}

.tick.major {
  height: 20px;
  background: rgba(255, 255, 255, 0.8);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}
