/* =============================================================================
   TransXplorer Complete CSS - Version 3 (WITH DEBUGGING)
   
   This version includes:
   - Fallback fonts
   - Visible debug borders (comment out after testing)
   - All original styles
   ============================================================================= */

/* =============================================================================
   DEBUG MODE - Comment out this section after testing
   ============================================================================= */
/*
.modern-hero { border: 5px solid red !important; }
.modern-hero-content { border: 5px solid yellow !important; }
.modern-hero-title { border: 5px solid lime !important; }
.modern-features { border: 5px solid blue !important; }
.modern-modules { border: 5px solid purple !important; }
.modern-workflow { border: 5px solid orange !important; }
.modern-stats { border: 5px solid pink !important; }
*/

/* =============================================================================
   MODERN HOME CSS (from modern_home_css variable)
   ============================================================================= */

:root {
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  --secondary-gradient: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
  --success-gradient: linear-gradient(135deg, #4f46e5 0%, #a855f7 100%);
  --dark-gradient: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
  --navbar-gradient: linear-gradient(135deg, #2b6cb0 0%, #065f46 100%);
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.25);
  --text-primary: #1e3a8a;
  --text-secondary: #4b5563;
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-medium: 0 16px 48px rgba(0, 0, 0, 0.18);
  --border-radius: 24px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  background: #f8fafc;
}

.navbar {
  background: var(--navbar-gradient);
  border: none;
  margin-bottom: 0;
  box-shadow: var(--shadow-soft);
}

.navbar-brand {
  color: white !important;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
}

.navbar-nav > li > a {
  color: rgba(255, 255, 255, 0.85) !important;
  transition: all 0.3s ease;
}

.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus {
  color: white !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

.navbar-nav > .active > a {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

/* Dropdown menus */
.navbar-nav .dropdown-menu {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-medium);
}

.navbar-nav .dropdown-menu > li > a {
  color: var(--text-primary);
}

.navbar-nav .dropdown-menu > li > a:hover {
  background: var(--primary-gradient);
  color: white;
}

/* Hero Section with Interactive Background */
.modern-hero {
  background: var(--primary-gradient);
  color: white;
  padding: 10rem 2rem 10rem 2rem;
  margin-top: 0 !important;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

#bio-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.6;
}

.modern-hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.modern-hero-cta {
  position: relative;
  z-index: 11;
  animation: fadeInUp 1s ease-out 0.4s both;
}

@keyframes movePattern {
  0% { background-position: 0% 0%; }
  100% { background-position: -40% -40%; }
}

@keyframes rotateDNA {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* FIXED: Hero title with fallback for gradient text */
.modern-hero-title {
  font-family: 'Poppins', 'Inter', -apple-system, sans-serif;
  font-size: 6rem;
  font-weight: 900;
  margin-bottom: 2.5rem;
  color: white; /* FALLBACK - shows if gradient fails */
  background: linear-gradient(45deg, #fff, #e0f2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease-out;
}

/* Additional fallback for older browsers */
@supports not (-webkit-background-clip: text) {
  .modern-hero-title {
    color: white !important;
    background: none !important;
    -webkit-text-fill-color: white !important;
  }
}

.modern-hero-subtitle {
  font-size: 1.8rem;
  margin-bottom: 3.5rem;
  opacity: 0.9;
  line-height: 1.5;
  color: white; /* Explicit color */
  animation: fadeInUp 1s ease-out 0.2s both;
}

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

/* Modern Buttons with Pulse */
.btn-modern {
  padding: 1.2rem 3rem;
  border: none;
  border-radius: var(--border-radius);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font-size: 1.2rem;
  margin: 0.75rem;
}

.btn-primary-modern {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
}

.btn-primary-modern:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-medium);
  color: white;
}

.btn-gradient {
  background: var(--primary-gradient);
  color: white;
  border: none;
  box-shadow: var(--shadow-soft);
  animation: pulse 2s infinite;
}

.btn-gradient:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-medium);
  color: white;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* Dynamic Facts Display */
#transcriptome-fact {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  color: white;
  font-size: 1.1rem;
  text-align: center;
  max-width: 600px;
  animation: fadeIn 1s ease-out;
}

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

/* Feature Grid with Hover Details */
.modern-features {
  padding: 10rem 2rem;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.modern-section-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  text-align: center;
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 4rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #3b82f6; /* Fallback color */
}

/* Fallback for gradient text */
@supports not (-webkit-background-clip: text) {
  .modern-section-title {
    color: #3b82f6 !important;
    background: none !important;
    -webkit-text-fill-color: #3b82f6 !important;
  }
}

.modern-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}

.modern-feature-card {
  background: white;
  padding: 3.5rem 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.modern-feature-card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: var(--shadow-medium);
}

.modern-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--primary-gradient);
}

.modern-feature-icon {
  width: 90px;
  height: 90px;
  background: var(--primary-gradient);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
  color: white;
  font-size: 2.5rem;
  transition: transform 0.3s ease;
}

.modern-feature-card:hover .modern-feature-icon {
  transform: scale(1.1);
}

.modern-feature-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-primary);
}

.modern-feature-description {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.modern-feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.modern-tag {
  background: var(--glass-bg);
  color: var(--text-primary);
  padding: 0.4rem 1rem;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.modern-tag:hover {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
}

/* Module Grid - ANALYSIS MODULES SECTION */
.modern-modules {
  padding: 10rem 2rem;
  background: white;
}

.modern-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}

.modern-module-card {
  background: var(--primary-gradient);
  color: white;
  padding: 3.5rem 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.modern-module-card:nth-child(2) {
  background: var(--secondary-gradient);
}

.modern-module-card:nth-child(3) {
  background: var(--success-gradient);
}

.modern-module-card:nth-child(4) {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
}

.modern-module-card:nth-child(5) {
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
}

.modern-module-card:nth-child(6) {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.modern-module-card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: var(--shadow-medium);
}

.modern-module-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.modern-module-card:hover .modern-module-icon {
  transform: rotate(10deg) scale(1.1);
}

.modern-module-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: white;
}

.modern-module-card p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.modern-module-features {
  list-style: none;
  margin-top: 1.5rem;
  padding: 0;
}

.modern-module-features li {
  padding: 0.4rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.modern-module-features li::before {
  content: '✓';
  color: rgba(255,255,255,0.8);
  margin-right: 0.5rem;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* Stats Section - TRANSXPLORER IMPACT */
.modern-stats {
  background: var(--dark-gradient);
  color: white;
  padding: 8rem 2rem;
  text-align: center;
}

.modern-stats .modern-section-title {
  color: white !important;
  -webkit-text-fill-color: white !important;
  background: none !important;
}

.modern-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3.5rem;
  margin-top: 4rem;
}

.modern-stat-item {
  text-align: center;
}

.modern-stat-number {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
  background: linear-gradient(45deg, #fff, #e0f2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: white; /* Fallback */
}

.modern-stat-label {
  opacity: 0.9;
  font-weight: 500;
  font-size: 1.1rem;
  color: white;
}

/* Workflow Steps - YOUR RESEARCH WORKFLOW */
.modern-workflow {
  padding: 10rem 2rem;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.modern-workflow-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2.5rem;
  margin-top: 4rem;
}

.modern-workflow-step {
  text-align: center;
}

.modern-workflow-step:nth-child(1) { grid-column: 1; }
.modern-workflow-step:nth-child(2) { grid-column: 3; }
.modern-workflow-step:nth-child(3) { grid-column: 5; }
.modern-workflow-step:nth-child(4) { grid-column: 2; }
.modern-workflow-step:nth-child(5) { grid-column: 4; }

.modern-step-number {
  width: 90px;
  height: 90px;
  background: var(--primary-gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 auto 2.5rem;
  transition: transform 0.3s ease;
}

.modern-workflow-step:hover .modern-step-number {
  transform: scale(1.1);
}

.modern-step-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-primary);
}

.modern-step-description {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1.1rem;
}

/* Footer */
.modern-footer {
  background: #f8fafc;
  padding: 4rem 2rem;
  text-align: center;
  border-top: 1px solid #e2e8f0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.modern-footer-content {
  max-width: 900px;
  margin: 0 auto;
}

/* CTA Section */
.modern-cta {
  padding: 10rem 2rem;
  background: white;
  text-align: center;
}

.modern-cta-content {
  max-width: 700px;
  margin: 0 auto;
}

.modern-cta-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 2.5rem;
  color: var(--text-primary);
}

.modern-cta-description {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 3.5rem;
  line-height: 1.7;
}

/* Accessibility Improvements */
[role='button'], a, button {
  outline: none;
}

:focus-visible {
  outline: 3px solid #3b82f6;
  outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .modern-hero-title {
    font-size: 3.5rem !important;
  }
  
  .modern-hero-subtitle {
    font-size: 1.4rem !important;
  }
  
  .modern-feature-grid,
  .modern-module-grid {
    grid-template-columns: 1fr !important;
  }
  
  .modern-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .modern-workflow-steps {
    grid-template-columns: 1fr !important;
  }
  
  .modern-workflow-step:nth-child(1),
  .modern-workflow-step:nth-child(2),
  .modern-workflow-step:nth-child(3),
  .modern-workflow-step:nth-child(4),
  .modern-workflow-step:nth-child(5) {
    grid-column: 1 !important;
  }
  
  .modern-section-title {
    font-size: 2.5rem !important;
  }
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.loading-spinner.active {
  opacity: 1;
  visibility: visible;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #10b981;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

.spinner-fact {
  color: white;
  font-size: 1.2rem;
  margin-top: 1rem;
  text-align: center;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Animation classes */
.animate-on-scroll {
  opacity: 1; /* Changed from 0 to ensure content is visible even without JS */
  transform: translateY(0);
  transition: all 0.8s ease;
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================================================
   TUTORIAL STYLES (from tutorial_css variable)
   ============================================================================= */

.tutorial-container { 
  display: flex; 
  min-height: calc(100vh - 60px); 
  background: #f5f7fa; 
}

.tutorial-nav {
  width: 260px; 
  min-width: 260px;
  background: linear-gradient(180deg, #1a237e 0%, #283593 100%);
  color: white; 
  position: sticky; 
  top: 60px; 
  height: calc(100vh - 60px); 
  overflow-y: auto;
}

.tutorial-nav-header { 
  padding: 20px; 
  background: rgba(0,0,0,0.15); 
  border-bottom: 1px solid rgba(255,255,255,0.1); 
}

.tutorial-nav-header h3 { 
  margin: 0; 
  font-size: 1.15rem; 
  display: flex; 
  align-items: center; 
  gap: 8px; 
}

.tutorial-nav-section { 
  padding: 10px 0; 
  border-bottom: 1px solid rgba(255,255,255,0.08); 
}

.tutorial-nav-section-title { 
  padding: 10px 15px 6px; 
  font-size: 0.7rem; 
  text-transform: uppercase; 
  letter-spacing: 1.2px; 
  opacity: 0.6; 
  font-weight: 600; 
}

.tutorial-nav-item {
  display: block; 
  padding: 11px 15px 11px 22px; 
  color: rgba(255,255,255,0.85);
  cursor: pointer; 
  transition: all 0.2s; 
  border-left: 3px solid transparent; 
  font-size: 0.92rem;
}

.tutorial-nav-item:hover { 
  background: rgba(255,255,255,0.1); 
  color: white; 
}

.tutorial-nav-item.active { 
  background: rgba(255,255,255,0.15); 
  border-left-color: #64b5f6; 
  color: white; 
  font-weight: 500; 
}

.tutorial-nav-item i { 
  margin-right: 10px; 
  opacity: 0.85; 
}

.tutorial-content { 
  flex: 1; 
  padding: 30px 40px; 
  max-width: 1200px; 
}

.tutorial-header { 
  margin-bottom: 24px; 
  padding-bottom: 14px; 
  border-bottom: 2px solid #e0e0e0; 
}

.tutorial-header h1 { 
  font-size: 1.65rem; 
  color: #1a237e; 
  margin: 0; 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  font-weight: 600; 
}

.tutorial-section { 
  background: white; 
  border-radius: 12px; 
  padding: 26px 28px; 
  margin-bottom: 22px; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.06); 
  border: 1px solid #e8e8e8; 
}

.tutorial-section h2 { 
  font-size: 1.25rem; 
  color: #1a237e; 
  margin: 0 0 16px 0; 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  font-weight: 600; 
}

.tutorial-section h3 { 
  font-size: 1.05rem; 
  color: #333; 
  margin: 18px 0 12px; 
  font-weight: 600; 
}

.tutorial-section p { 
  color: #444; 
  line-height: 1.7; 
  margin-bottom: 16px; 
  font-size: 0.98rem; 
}

.tutorial-section li { 
  color: #444; 
  line-height: 1.65; 
  margin-bottom: 8px; 
  font-size: 0.95rem; 
}

.interpretation-box { 
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%); 
  border: 1px solid #c8e6c9; 
  border-radius: 10px; 
  padding: 18px 20px; 
  margin: 14px 0; 
}

.interpretation-box h4 { 
  color: #2e7d32; 
  margin: 0 0 12px 0; 
  font-size: 1.05rem; 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  font-weight: 600; 
}

.tutorial-tip { 
  background: #fff8e1; 
  border: 1px solid #ffe082; 
  border-radius: 10px; 
  padding: 16px 18px; 
  margin: 16px 0; 
  display: flex; 
  gap: 14px; 
  align-items: flex-start; 
}

.tutorial-tip i { 
  color: #f9a825; 
  font-size: 1.3rem; 
  margin-top: 2px; 
  flex-shrink: 0; 
}

.tutorial-tip div { 
  font-size: 0.95rem; 
  line-height: 1.6; 
  color: #5d4037; 
}

.tutorial-info { 
  background: #e3f2fd; 
  border: 1px solid #90caf9; 
  border-radius: 10px; 
  padding: 16px 18px; 
  margin: 16px 0; 
  font-size: 0.95rem; 
  line-height: 1.6; 
}

.tutorial-warning { 
  background: #ffebee; 
  border: 1px solid #ef9a9a; 
  border-radius: 10px; 
  padding: 16px 18px; 
  margin: 16px 0; 
  font-size: 0.95rem; 
}

.tutorial-stats-row { 
  display: flex; 
  gap: 16px; 
  margin: 20px 0; 
  flex-wrap: wrap; 
}

.tutorial-stat-card { 
  flex: 1; 
  min-width: 140px; 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
  color: white; 
  padding: 20px 18px; 
  border-radius: 12px; 
  text-align: center; 
  box-shadow: 0 4px 12px rgba(102,126,234,0.3); 
}

.tutorial-stat-card.green { 
  background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%); 
}

.tutorial-stat-card.teal { 
  background: linear-gradient(135deg, #00897b 0%, #26a69a 100%); 
}

.tutorial-stat-card.red { 
  background: linear-gradient(135deg, #e53935 0%, #ef5350 100%); 
}

.tutorial-stat-card.blue { 
  background: linear-gradient(135deg, #1e88e5 0%, #42a5f5 100%); 
}

.tutorial-stat-card.orange { 
  background: linear-gradient(135deg, #fb8c00 0%, #ffa726 100%); 
}

.tutorial-stat-card .stat-value { 
  font-size: 2rem; 
  font-weight: 700; 
}

.tutorial-stat-card .stat-label { 
  font-size: 0.8rem; 
  opacity: 0.95; 
  margin-top: 6px; 
  text-transform: uppercase; 
}

.tutorial-nav-buttons { 
  display: flex; 
  justify-content: space-between; 
  margin-top: 28px; 
  padding-top: 18px; 
  border-top: 1px solid #e0e0e0; 
}

.tutorial-nav-btn { 
  display: inline-flex; 
  align-items: center; 
  gap: 8px; 
  padding: 12px 20px; 
  border-radius: 8px; 
  cursor: pointer; 
  transition: all 0.2s; 
  font-size: 0.95rem; 
  font-weight: 500; 
}

.tutorial-nav-btn-prev { 
  background: #f5f5f5; 
  color: #555; 
  border: 1px solid #ddd; 
}

.tutorial-nav-btn-prev:hover { 
  background: #eee; 
}

.tutorial-nav-btn-next { 
  background: linear-gradient(135deg, #1a237e 0%, #283593 100%); 
  color: white; 
  border: none; 
}

.tutorial-nav-btn-next:hover { 
  transform: translateX(3px); 
  box-shadow: 0 4px 12px rgba(26,35,126,0.3); 
}

@media (max-width: 992px) { 
  .tutorial-container { 
    flex-direction: column; 
  } 
  .tutorial-nav { 
    width: 100%; 
    height: auto; 
    position: relative; 
  } 
  .tutorial-content { 
    padding: 20px; 
  }
}

/* =============================================================================
   GRN STYLES (from grn_css and grn_custom_css)
   ============================================================================= */

.info-card {
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.network-container {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 10px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.results-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.results-header h3 {
  color: white !important;
}

.table-container {
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.plot-container {
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.grn-guide {
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.tf-badge-activator {
  background-color: #d4edda;
  color: #155724;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
}

.tf-badge-repressor {
  background-color: #f8d7da;
  color: #721c24;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
}

.tf-badge-mixed {
  background-color: #fff3cd;
  color: #856404;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
}

.key-finding-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.key-finding-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.executive-banner {
  background-size: 200% 200%;
  animation: gradientShift 10s ease infinite;
}

.tf-card {
  transition: all 0.2s ease;
}

.tf-card:hover {
  background: #f0f4f8 !important;
}

.enrichment-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.hypothesis-item {
  background: #fff;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  border-left: 3px solid #e65100;
}

.story-box {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #ddd;
}

.druggable-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.75em;
  border-radius: 10px;
  background: #e8f5e9;
  color: #2e7d32;
  font-weight: 500;
}

/* =============================================================================
   ENRICHMENT ANALYSIS STYLES
   ============================================================================= */

.enrichment-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  color: white;
  position: relative;
  overflow: hidden;
}

.enrichment-hero h1 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 2.2rem;
  position: relative;
}

/* =============================================================================
   DECONVOLUTION RESULTS STYLING
   ============================================================================= */

.deconv-results-container {
  margin-top: 20px;
}

.summary-card {
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.deconv-summary-cards .info-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-left: 4px solid #3498db;
}

.deconv-summary-cards .info-card h4 {
  font-size: 32px;
  font-weight: bold;
  margin: 10px 0;
  color: #2c3e50;
}

.panel-primary > .panel-heading {
  background-color: #3498db !important;
  border-color: #3498db !important;
  color: white !important;
}

.panel-success > .panel-heading {
  background-color: #27ae60 !important;
  border-color: #27ae60 !important;
  color: white !important;
}

.panel-warning > .panel-heading {
  background-color: #f39c12 !important;
  border-color: #f39c12 !important;
  color: white !important;
}

.panel-danger > .panel-heading {
  background-color: #e74c3c !important;
  border-color: #e74c3c !important;
  color: white !important;
}

.panel-info > .panel-heading {
  background-color: #5dade2 !important;
  border-color: #5dade2 !important;
  color: white !important;
}

/* =============================================================================
   LOADING OVERLAY STYLES
   ============================================================================= */

#app-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(240,248,255,0.98) 100%);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: opacity 0.5s ease-out;
}

#app-loading-overlay.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

body.shiny-busy #app-loading-overlay.hidden {
  display: none !important;
}

/* =============================================================================
   GENERAL UI IMPROVEMENTS
   ============================================================================= */

.well {
  background: #fff;
  border: 1px solid #e9ecef;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
  margin-bottom: 15px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.nav-tabs > li > a {
  border-radius: 4px 4px 0 0;
  font-weight: 500;
}

.nav-tabs > li.active > a {
  background: #f8f9fa;
  border-bottom-color: #f8f9fa;
}

.nav-pills > li > a {
  background-color: #f8f9fa;
  margin-right: 5px;
}

.nav-pills > li.active > a {
  background-color: #337ab7 !important;
}

.tab-content {
  margin-top: 20px;
}

.panel-heading {
  background-color: #f8f9fa;
  padding: 10px 15px;
  margin: 0;
  border-bottom: 1px solid #dee2e6;
  border-radius: 4px 4px 0 0;
}

/* Fix panel body to not have conflicting padding */
.panel > .panel-heading + .panel-body {
  padding-top: 15px;
}

/* Ensure panels with gradient headers display correctly */
.panel .panel-heading[style*="gradient"] {
  margin: 0;
  padding: 0;
}

.panel .panel-heading[style*="gradient"] h4 {
  margin: 0;
  padding: 15px;
}

.progress-bar-striped {
  background-color: #337ab7;
}

.fade {
  opacity: 0;
  transition: opacity 0.15s linear;
}

.fade.in {
  opacity: 1;
}

/* DataTable Styling */
.dataTables_wrapper {
  font-size: 0.95em;
}

.dataTable thead th {
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
}

.dataTable tbody tr:hover {
  background-color: #e3f2fd !important;
}

/* Smooth Animations */
.collapse {
  transition: all 0.3s ease;
}

.collapsing {
  transition: height 0.3s ease;
}

.btn:focus, .btn:active {
  outline: none !important;
  box-shadow: 0 3px 6px rgba(74,144,226,0.35) !important;
}

.collapse.show {
  animation: subtleFadeIn 0.3s ease-out;
}

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

/* =============================================================================
   CORE STYLES (from css variable)
   ============================================================================= */

html, body {
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

* {
  max-width: 100%;
  box-sizing: border-box;
}

.workflow-box {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin: 10px;
  background: white;
  transition: all 0.3s ease;
}

.workflow-box:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.tool-feature {
  cursor: pointer;
  padding: 15px;
  border-radius: 8px;
  margin: 10px 0;
  background: white;
  border: 1px solid #e1e4e8;
}

.tool-feature:hover {
  background: #f8f9fa;
}

.feature-content {
  display: none;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
}

/* =============================================================================
   MOBILE RESPONSIVENESS
   ============================================================================= */

@media only screen and (max-width: 768px) {
  html, body {
    width: 100%;
    overflow-x: hidden;
  }

  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  .col-sm-3, .col-sm-9, .col-md-4, .col-md-8 {
    width: 100% !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  #deg-upload-container, .results-panel-custom {
    width: 100% !important;
    margin-left: 0 !important;
  }

  .tab-content > .tab-pane {
    padding-top: 0 !important;
  }
  
  .modern-hero {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
    min-height: 60vh;
  }

  h1, h2, h3, h4, h5 {
    word-wrap: break-word;
  }

  .btn, .action-button, button, .form-control, .selectize-input {
    width: 100% !important;
    margin-top: 8px !important;
    margin-bottom: 8px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    font-size: 16px !important;
  }

  .well, .panel, .info-card, .parameter-section, .step-card {
    margin: 10px 0 !important;
    padding: 15px !important;
  }

  .shiny-plot-output, .plotly, .vis-network {
    max-width: 100%;
    height: auto !important;
  }
  
  .dataTables_wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-tabs, .nav-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .nav-tabs > li, .nav-pills > li {
    flex-shrink: 0;
  }
}

/* =============================================================================
   FASTQ PROCESSING STYLES
   ============================================================================= */

.fastq-hero {
  background: linear-gradient(135deg, #e3f2fd 0%, #f1f8e9 100%);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.fastq-hero h1 {
  color: #1565c0;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
  font-family: 'Poppins', sans-serif;
}

.fastq-hero p {
  color: #424242;
  font-size: 1.1rem;
  margin-bottom: 0;
  font-family: 'Inter', sans-serif;
}

.analysis-mode-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  border-left: 4px solid #1976d2;
}

.parameter-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e9ecef;
}

.upload-zone {
  border: 2px dashed #1976d2;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(45deg, #f3f4f6 0%, #ffffff 100%);
  transition: all 0.3s ease;
  margin: 1rem 0;
  cursor: pointer;
}

/* =============================================================================
   CELL TYPE DECONVOLUTION PLOT FIXES
   ============================================================================= */

/* Fix plotly overflow in panels */
.panel-body .plotly {
  max-width: 100%;
  overflow: hidden;
}

.panel-body .js-plotly-plot {
  max-width: 100% !important;
}

/* Ensure deconv barplot stays within bounds */
#deconv_barplot {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
}

/* Fix panel structure */
.panel {
  overflow: hidden;
}

.panel-body {
  overflow-x: auto;
  overflow-y: visible;
}

/* =============================================================================
   PATHWAY ENRICHMENT SUMMARY CARDS
   ============================================================================= */

/* Main Summary Row - Horizontal Card Layout */
.enrichment-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.enrichment-stat-card {
  flex: 1;
  min-width: 180px;
  max-width: 280px;
  background: white;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.enrichment-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.enrichment-stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.enrichment-stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: #1e293b;
}

.enrichment-stat-card .stat-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  margin-top: 4px;
}

/* Card Variants */
.stat-card-primary .stat-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.stat-card-success .stat-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.stat-card-accent .stat-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.stat-card-outline {
  border: 2px solid #e2e8f0;
  background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
}

.stat-card-outline .stat-icon {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
}

/* By-Database Summary Row */
.db-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.db-stat-item {
  flex: 1;
  min-width: 140px;
  max-width: 200px;
  text-align: center;
  padding: 12px 16px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.db-stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.db-stat-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.db-stat-value.primary {
  color: #667eea;
}

.db-stat-value.success {
  color: #10b981;
}

.db-stat-value.info {
  color: #0ea5e9;
}

.db-stat-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .enrichment-summary-row {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  
  .enrichment-stat-card {
    max-width: 100%;
  }
  
  .db-summary-row {
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }
  
  .db-stat-item {
    max-width: 100%;
  }
}
