/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Smooth scrolling for desktop */
html {
  scroll-behavior: smooth;
}

/* Optimize scroll performance on mobile ONLY - Desktop keeps smooth scrolling */
@media (max-width: 768px) {
  html {
    scroll-behavior: auto; /* Disable smooth scrolling on mobile for better performance */
  }
  
  /* Performance optimizations for mobile ONLY */
  * {
    will-change: auto;
    transform: none;
  }
  
  /* Only enable GPU acceleration for specific elements that need it on mobile */
  .hover-lift,
  .dna-helix,
  .progress-fill,
  .global-particle {
    will-change: transform, opacity;
    transform: translateZ(0);
  }
}

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

::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(34, 197, 94, 0.6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 197, 94, 0.8);
}

/* Smooth transitions for all interactive elements */
button, a {
  transition: all 0.3s ease;
}

/* Glow effects for futuristic look */
.glow-cyan {
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}

.glow-green {
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

/* Animated background patterns */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* Futuristic text effects */
.text-glow {
  text-shadow: 0 0 10px currentColor;
}

/* Backdrop blur for better readability */
.backdrop-blur-strong {
  backdrop-filter: blur(12px);
}

/* Loading animations */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Pulse hint for audio player when autoplay is blocked */
.pulse-hint {
  animation: pulse-glow 1.5s ease-in-out 3;
  border-color: rgba(34, 211, 238, 0.8) !important;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.4) !important;
}

/* Interactive hover effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Gradient text effects */
.gradient-text {
  background: linear-gradient(135deg, #22d3ee, #22c55e);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Custom border animations */
@keyframes border-glow {
  0%, 100% {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.2);
  }
  50% {
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
  }
}

.border-animate {
  animation: border-glow 3s ease-in-out infinite;
}

/* Typography improvements */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.025em;
}

/* Enhanced focus states for accessibility */
button:focus, 
a:focus {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}

/* Navigation styles */
.nav-btn {
  color: #d1d5db;
}

.nav-btn:hover {
  color: #22d3ee;
  background-color: rgba(34, 211, 238, 0.1);
}

.nav-btn.active {
  background-color: rgba(34, 211, 238, 0.2);
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.4);
}

/* Sign In Dropdown Styles */
#sign-in-dropdown {
  transform: translateY(-10px) scale(0.95);
  transition: all 0.2s ease;
  z-index: 1000;
}

#sign-in-dropdown.opacity-100 {
  transform: translateY(0) scale(1);
}

#sign-in-arrow {
  transition: transform 0.2s ease;
  font-size: 0.75rem;
}

#mobile-sign-in-arrow {
  transition: transform 0.2s ease;
  font-size: 0.75rem;
}

/* Sign In Button Active State */
#sign-in-btn.bg-cyan-500\/20 {
  background-color: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.4);
}

/* Tab Button Styling for Sign In/Sign Up Forms */
.tab-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.4);
  color: #9ca3af;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.1), transparent);
  transition: left 0.5s ease;
}

.tab-btn:hover::before {
  left: 100%;
}

.tab-btn:hover {
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.3);
  color: #22d3ee;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(34, 211, 238, 0.2);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(34, 197, 94, 0.15));
  border-color: #22d3ee;
  color: #22d3ee;
  box-shadow: 
    0 4px 15px rgba(34, 211, 238, 0.3),
    0 0 20px rgba(34, 211, 238, 0.2);
  transform: translateY(-2px);
}

.tab-btn.active::before {
  display: none;
}

/* Form Input Enhancements */
#sign-in-dropdown input:focus,
#mobile-sign-in-form input:focus {
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
  transform: scale(1.02);
}

/* Form Button Hover Effects */
#sign-in-dropdown button[type="submit"]:hover,
#mobile-sign-in-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(34, 211, 238, 0.4);
}

/* Form Button Active States */
#sign-in-dropdown button[type="submit"],
#mobile-sign-in-form button[type="submit"] {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#sign-in-dropdown button[type="submit"]:active,
#mobile-sign-in-form button[type="submit"]:active {
  transform: scale(0.98);
}

/* Form Button Loading States */
#sign-in-dropdown button[type="submit"]:disabled,
#mobile-sign-in-form button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Mobile form button improvements */
@media (max-width: 768px) {
  #mobile-sign-in-form button[type="submit"] {
    min-height: 44px; /* Better touch target */
    font-size: 0.9rem;
    font-weight: 600;
  }
  
  /* Prevent zoom on input focus for iOS */
  #mobile-sign-in-form input,
  #mobile-sign-in-form select,
  #mobile-sign-in-form textarea {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
}

/* Mobile Sign In Form Animation */
#mobile-sign-in-form {
  transition: all 0.3s ease;
  max-height: 0;
  overflow: hidden;
}

#mobile-sign-in-form:not(.hidden) {
  max-height: 80vh; /* Use viewport height for better mobile compatibility */
  overflow-y: auto; /* Allow scrolling if content exceeds max height */
}

/* Mobile Sign In Form Container Improvements */
#mobile-sign-in-form .bg-black\/40 {
  max-height: calc(80vh - 2rem);
  overflow-y: auto;
  padding: 1rem;
}

/* Mobile Sign Up Form Specific Styling */
#mobile-signup-content {
  max-height: calc(70vh - 1rem);
  overflow-y: auto;
  padding-right: 0.25rem; /* Space for scrollbar */
}

#mobile-signin-content {
  max-height: calc(40vh - 1rem);
  overflow-y: auto;
}

/* Ensure mobile forms fit on screen properly */
@media (max-height: 600px) {
  #mobile-sign-in-form:not(.hidden) {
    max-height: 90vh; /* Use more screen space on small height screens */
  }
  
  #mobile-sign-in-form .bg-black\/40 {
    max-height: calc(90vh - 2rem);
    padding: 0.75rem;
  }
  
  /* Reduce spacing on very small screens */
  #mobile-sign-in-form .space-y-3 > * + * {
    margin-top: 0.5rem;
  }
}

/* Improve mobile form scrolling experience */
#mobile-sign-in-form {
  /* Enable smooth scrolling */
  scroll-behavior: smooth;
}

/* Custom scrollbar for mobile forms */
#mobile-sign-in-form::-webkit-scrollbar {
  width: 4px;
}

#mobile-sign-in-form::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

#mobile-sign-in-form::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.5);
  border-radius: 2px;
}

#mobile-sign-in-form::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.7);
}

/* Notification Enhancement */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 500;
  z-index: 9999;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification.info {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.9), rgba(6, 182, 212, 0.9));
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.3);
}

.notification.error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
}

.notification.success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(22, 163, 74, 0.9));
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.3);
}

/* Section visibility */
.section {
  display: none !important;
}

.section.active {
  display: block !important;
}

/* Post card styles */
.post-card {
  padding: 1.5rem;
  border-radius: 0.5rem;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.post-card.major-update {
  border-left: 4px solid #22d3ee;
  background: linear-gradient(to right, rgba(21, 94, 117, 0.3), rgba(30, 58, 138, 0.3));
}

.post-card.research {
  border-left: 4px solid #22c55e;
  background: linear-gradient(to right, rgba(20, 83, 45, 0.3), rgba(6, 78, 59, 0.3));
}

.post-card.patch-note {
  border-left: 4px solid #a855f7;
  background: linear-gradient(to right, rgba(88, 28, 135, 0.3), rgba(109, 40, 217, 0.3));
}

.post-card.update {
  border-left: 4px solid #3b82f6;
  background: linear-gradient(to right, rgba(30, 58, 138, 0.3), rgba(67, 56, 202, 0.3));
}

.post-card.featured {
  ring: 2px;
  ring-color: rgba(34, 211, 238, 0.5);
}

/* Post card mobile responsive */
@media (max-width: 768px) {
  .post-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .post-card h3 {
    font-size: 1.125rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
  }
  
  .post-card p {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
  }
  
  /* Improve the post header layout on mobile */
  .post-card .flex.flex-col.sm\\:flex-row {
    gap: 0.5rem;
  }
  
  /* Make sure tags wrap nicely */
  .post-card .flex.flex-wrap.gap-2 {
    margin-bottom: 1rem;
  }
  
  /* Improve bottom section spacing */
  .post-card .flex.flex-col.sm\\:flex-row.sm\\:items-center.sm\\:justify-between {
    gap: 1rem;
  }
}

/* Interaction buttons */
.interaction-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.interaction-btn:hover {
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .interaction-btn {
    min-width: 3rem;
    min-height: 3rem;
    padding: 0.75rem;
    flex: 0 0 auto; /* Prevent buttons from shrinking */
  }
  
  .interaction-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  /* Ensure button container stays horizontal */
  .post-card .flex.items-center.space-x-4 {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }
  
  /* Improve button spacing on very small screens */
  @media (max-width: 480px) {
    .interaction-btn {
      min-width: 2.75rem;
      min-height: 2.75rem;
      padding: 0.625rem;
    }
  }
}

.interaction-btn.like {
  color: #3b82f6;
}

.interaction-btn.like:hover {
  color: #2563eb;
}

.interaction-btn.heart {
  color: #ef4444;
}

.interaction-btn.heart:hover {
  color: #dc2626;
}

.interaction-btn.share {
  color: #22c55e;
}

.interaction-btn.share:hover {
  color: #16a34a;
}

/* Force horizontal layout for interaction buttons */
.post-card .interaction-buttons-container {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 3rem;
}

@media (min-width: 640px) {
  .post-card .interaction-buttons-container {
    justify-content: flex-end;
  }
}

/* Ensure emoji icons in interaction buttons are properly sized */
.interaction-btn .emoji-img-small {
  width: 1.2em;
  height: 1.2em;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Active states for liked/hearted posts */
.interaction-btn.like.active {
  color: #3b82f6 !important;
  background-color: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  transform: scale(1.05);
}

.interaction-btn.heart.active {
  color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  transform: scale(1.05);
  animation: heartPulse 0.6s ease-in-out;
}

/* Heart pulse animation */
@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1.05); }
}

/* Like count styling */
.interaction-btn .count {
  font-weight: 600;
  font-size: 0.75rem;
  opacity: 0.9;
  transition: all 0.2s ease;
}

.interaction-btn.active .count {
  opacity: 1;
  font-weight: 700;
}

/* Hover effects for active buttons */
.interaction-btn.like.active:hover {
  background-color: rgba(59, 130, 246, 0.15);
  transform: scale(1.08);
}

.interaction-btn.heart.active:hover {
  background-color: rgba(239, 68, 68, 0.15);
  transform: scale(1.08);
}

/* Share button enhanced styling */
.interaction-btn.share:hover {
  background-color: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .interaction-btn .emoji-img-small {
    width: 1.1em;
    height: 1.1em;
  }
  
  /* Mobile optimization for Get Involved section emojis */
  .emoji-img-medium {
    width: 1em !important;
    height: 1em !important;
  }
  
  /* Contact section mobile improvements */
  #contact-section .bg-black\/40 {
    padding: 1.5rem !important;
  }
  
  /* Better spacing for Get Involved items on mobile */
  #contact-section .space-y-4 > div {
    margin-bottom: 1rem;
  }
  
  /* Improve layout for contact items on mobile */
  #contact-section .flex.items-start {
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  /* Better typography on mobile for contact section */
  #contact-section h4 {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  #contact-section p {
    font-size: 0.875rem;
    line-height: 1.4;
  }
  
  /* Ensure text wrapper div doesn't grow too wide */
  #contact-section .flex.items-start > div:last-child {
    flex: 1;
    min-width: 0;
  }
}

/* Timeline styles */
.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
}

.timeline-marker {
  position: absolute;
  left: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-marker.major {
  background-color: #22d3ee;
  ring: 4px;
  ring-color: rgba(34, 211, 238, 0.3);
}

.timeline-marker.regular {
  background-color: #22c55e;
  ring: 4px;
  ring-color: rgba(34, 197, 94, 0.3);
}

.timeline-content {
  margin-left: 3rem;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid #374151;
}

/* Team member styles */
.team-member {
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #374151;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .team-member {
    padding: 1.5rem;
  }
}

@media (min-width: 768px) {
  .team-member {
    padding: 2rem;
  }
}

.team-member:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Ensure team member content doesn't overflow */
.team-member h3 {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.team-member p {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.team-avatar {
  width: 5rem;
  height: 5rem;
  background: linear-gradient(135deg, #22d3ee, #22c55e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .team-avatar {
    width: 6rem;
    height: 6rem;
    font-size: 2.5rem;
    margin: 0;
  }
}

.team-avatar img {
  position: absolute;
  z-index: 3;
  transform: translateY(1.6rem) scale(1.5) !important;
  filter: none;
  mix-blend-mode: normal;
}

@media (min-width: 768px) {
  .team-avatar img {
    transform: translateY(1.6rem) scale(1.8);
  }
}

.team-avatar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.3), rgba(34, 197, 94, 0.3));
  border-radius: 50%;
  z-index: 2;
}

/* Form styles */
#contact-form input,
#contact-form select,
#contact-form textarea {
  transition: border-color 0.3s ease;
}

#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .text-7xl {
    font-size: 3rem;
  }
  
  .text-5xl {
    font-size: 2.5rem;
  }
  
  .text-4xl {
    font-size: 2rem;
  }
  
  .text-3xl {
    font-size: 1.5rem;
  }
  
  .space-x-4 > * + * {
    margin-left: 0.5rem;
  }
  
  .grid.md\\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .grid.md\\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .flex.space-x-4:not(.progress-row) {
    flex-direction: column;
    space-x: 0;
  }
  
  .flex.space-x-4:not(.progress-row) > * + * {
    margin-left: 0;
    margin-top: 0.5rem;
  }
  
  /* Ensure progress bars remain horizontal on mobile */
  .progress-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.75rem !important;
  }
  
  /* Make progress bar labels smaller on mobile for better fit */
  .progress-row .w-32 {
    width: 5rem !important;
    font-size: 0.75rem !important;
    flex-shrink: 0;
  }
  
  /* Ensure progress text remains readable on mobile */
  .progress-row .w-12 {
    width: 2.5rem !important;
    font-size: 0.75rem !important;
    flex-shrink: 0;
    text-align: right;
  }
  
  /* Make sure progress bar container takes remaining space */
  .progress-row .flex-1 {
    flex: 1 !important;
    min-width: 0;
  }
  
  /* Ensure progress bar height is visible on mobile */
  .progress-row .h-2 {
    height: 0.625rem !important;
  }
  
  /* Mobile navigation - now handled by hamburger menu */
  #desktop-nav {
    display: none !important;
  }
  
  /* Extra mobile spacing for progress section */
  .space-y-4 {
    gap: 1rem;
  }
  
  /* Ensure progress container has proper mobile padding */
  .max-w-4xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Print styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  .bg-gradient-to-br,
  .bg-gradient-to-r,
  .backdrop-blur-sm {
    background: white !important;
  }
  
  .text-cyan-400,
  .text-green-400,
  .text-purple-400,
  .text-blue-400,
  .text-yellow-400 {
    color: black !important;
  }
}

/* Loading screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

/* Progress Bar Animations */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.animate-shimmer {
  animation: shimmer 2s infinite;
}

@keyframes progress-glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.8);
  }
}

.progress-glow {
  animation: progress-glow 2s ease-in-out infinite;
}

/* Progress bar specific styles */
.progress-container {
  position: relative;
  overflow: hidden;
}

.progress-fill {
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

/* Enhanced glow effects for progress bars */
.progress-bar-glow {
  filter: drop-shadow(0 0 8px currentColor);
}

/* Fix for progress bar gap */
#main-progress-bar {
  margin: 0 !important;
  padding: 0 !important;
  left: 0 !important;
  border-radius: 0 9999px 9999px 0 !important;
  width: 0%;
}

/* Progress bar track overflow fix */
.progress-track {
  overflow: hidden;
}

/* Initial progress bar widths */
#dna-progress,
#crispr-progress,
#lab-progress {
  width: 0%;
  min-width: 4px; /* Ensure very small percentages are visible */
  transition: width 1s ease-out;
}

/* When progress is at 100%, make it fully rounded */
#main-progress-bar.full-progress {
  border-radius: 9999px !important;
}

/* Utility classes for dynamic content */
.hidden {
  display: none !important;
}

.block {
  display: block !important;
}

/* Animation for page transitions */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

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

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 600;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background-color: #22c55e;
}

.notification.error {
  background-color: #ef4444;
}

.notification.info {
  background-color: #22d3ee;
}

/* Hide notifications on mobile */
@media (max-width: 768px) {
  .notification {
    display: none !important;
  }
}

/* Custom checkbox styles */
input[type="checkbox"] {
  appearance: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid #6b7280;
  border-radius: 0.25rem;
  background-color: transparent;
  cursor: pointer;
  position: relative;
}

input[type="checkbox"]:checked {
  background-color: #22d3ee;
  border-color: #22d3ee;
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Emoji Image Styles */
.emoji-img {
  width: 1.5em;
  height: 1.5em;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

.emoji-img-small {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

.emoji-img-particle {
  width: 1.5em;
  height: 1.5em;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

.emoji-img-medium {
  width: 1.25em;
  height: 1.25em;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

.emoji-img-large {
  width: 2.5em;
  height: 2.5em;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

/* Responsive grid improvements */
@media (max-width: 640px) {
  .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  .p-12 {
    padding: 2rem;
  }
  
  .p-8 {
    padding: 1.5rem;
  }
  
  /* Even smaller screens - make progress labels more compact */
  .progress-row .w-32 {
    width: 4rem !important;
    font-size: 0.7rem !important;
  }
  
  .progress-row .w-12 {
    width: 2rem !important;
    font-size: 0.7rem !important;
  }
  
  /* Reduce spacing between progress items */
  .progress-row {
    gap: 0.5rem !important;
  }
}
  
  .gap-12 {
    gap: 2rem;
  }
  
  .gap-8 {
    gap: 1.5rem;
  }


/* ===== LIVING BACKGROUND SYSTEM ===== */
/* 🖥️ DESKTOP: Full 30-minute gradient animation with all effects */
/* 📱 MOBILE: Simplified static gradient for performance */

/* Ultra-slow shifting gradient animation - 30+ minute full cycle */
@keyframes livingGradient {
  0% {
    background: linear-gradient(135deg, 
      #1e293b 0%,     /* slate-800 */
      #1e3a8a 25%,    /* blue-800 */
      #065f46 50%,    /* emerald-800 */
      #1e293b 75%,    /* slate-800 */
      #1e3a8a 100%    /* blue-800 */
    );
  }
  
  12.5% {
    background: linear-gradient(135deg, 
      #1e3a8a 0%,     /* blue-800 */
      #065f46 25%,    /* emerald-800 */
      #0f766e 50%,    /* teal-700 */
      #1e293b 75%,    /* slate-800 */
      #1e3a8a 100%    /* blue-800 */
    );
  }
  
  25% {
    background: linear-gradient(135deg, 
      #065f46 0%,     /* emerald-800 */
      #0f766e 25%,    /* teal-700 */
      #1e40af 50%,    /* blue-700 */
      #1e293b 75%,    /* slate-800 */
      #065f46 100%    /* emerald-800 */
    );
  }
  
  37.5% {
    background: linear-gradient(135deg, 
      #0f766e 0%,     /* teal-700 */
      #1e40af 25%,    /* blue-700 */
      #059669 50%,    /* emerald-600 */
      #1e293b 75%,    /* slate-800 */
      #0f766e 100%    /* teal-700 */
    );
  }
  
  50% {
    background: linear-gradient(135deg, 
      #1e40af 0%,     /* blue-700 */
      #059669 25%,    /* emerald-600 */
      #0891b2 50%,    /* cyan-600 */
      #1e293b 75%,    /* slate-800 */
      #1e40af 100%    /* blue-700 */
    );
  }
  
  62.5% {
    background: linear-gradient(135deg, 
      #059669 0%,     /* emerald-600 */
      #0891b2 25%,    /* cyan-600 */
      #2563eb 50%,    /* blue-600 */
      #1e293b 75%,    /* slate-800 */
      #059669 100%    /* emerald-600 */
    );
  }
  
  75% {
    background: linear-gradient(135deg, 
      #0891b2 0%,     /* cyan-600 */
      #2563eb 25%,    /* blue-600 */
      #10b981 50%,    /* emerald-500 */
      #1e293b 75%,    /* slate-800 */
      #0891b2 100%    /* cyan-600 */
    );
  }
  
  87.5% {
    background: linear-gradient(135deg, 
      #2563eb 0%,     /* blue-600 */
      #10b981 25%,    /* emerald-500 */
      #1e3a8a 50%,    /* blue-800 */
      #1e293b 75%,    /* slate-800 */
      #2563eb 100%    /* blue-600 */
    );
  }
  
  100% {
    background: linear-gradient(135deg, 
      #1e293b 0%,     /* slate-800 - back to start */
      #1e3a8a 25%,    /* blue-800 */
      #065f46 50%,    /* emerald-800 */
      #1e293b 75%,    /* slate-800 */
      #1e3a8a 100%    /* blue-800 */
    );
  }
}

/* Apply the living gradient to body */
body {
  animation: livingGradient 1800s ease-in-out infinite; /* 30 minutes = 1800 seconds */
  background-size: 400% 400%;
}

/* Mobile Performance Optimization - Reduce animations on mobile devices ONLY */
@media (max-width: 768px) {
  /* Disable heavy gradient animation on mobile ONLY */
  body {
    animation: none !important;
    background: linear-gradient(135deg, #1e293b 0%, #1e3a8a 50%, #065f46 100%) !important;
    background-size: 100% 100% !important;
  }
  
  /* Disable body overlays on mobile ONLY */
  body::before,
  body::after {
    display: none !important;
  }
}

/* Mobile Performance Optimization - Reduce animations on mobile devices */
@media (max-width: 768px) {
  /* Disable heavy gradient animation on mobile */
  body {
    animation: none !important;
    background: linear-gradient(135deg, #1e293b 0%, #1e3a8a 50%, #065f46 100%) !important;
    background-size: 100% 100% !important;
  }
  
  /* Disable body overlays on mobile */
  body::before,
  body::after {
    display: none !important;
  }
}

/* Subtle overlay gradient animation for depth */
@keyframes overlayShift {
  0%, 100% {
    background: radial-gradient(circle at 20% 80%, rgba(34, 211, 238, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.03) 0%, transparent 50%);
  }
  
  25% {
    background: radial-gradient(circle at 80% 80%, rgba(34, 197, 94, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.03) 0%, transparent 50%);
  }
  
  50% {
    background: radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(34, 197, 94, 0.03) 0%, transparent 50%);
  }
  
  75% {
    background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.03) 0%, transparent 50%);
  }
}

/* Add overlay to create more depth */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  animation: overlayShift 900s ease-in-out infinite; /* 15 minutes for overlay */
}

/* ===== SECTION PARTICLES ===== */

/* Create floating particles for each section */
@keyframes sectionFloat {
  0% {
    transform: translateY(calc(100vh + 100px)) rotate(0deg);
    opacity: 0;
  }
  5% {
    opacity: 0.25;
  }
  95% {
    opacity: 0.25;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Section particle container */
.section-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Individual section particles */
.section-particle {
  position: absolute;
  font-size: 15px;
  color: rgba(34, 211, 238, 0.2);
  animation: sectionFloat 50s linear infinite;
}

.section-particle:nth-child(2n) {
  color: rgba(34, 197, 94, 0.2);
  animation-duration: 65s;
}

.section-particle:nth-child(3n) {
  color: rgba(168, 85, 247, 0.15);
  animation-duration: 80s;
}

.section-particle:nth-child(4n) {
  color: rgba(251, 191, 36, 0.18);
  animation-duration: 70s;
}

/* Distribute particles across section width */
.section-particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.section-particle:nth-child(2) { left: 30%; animation-delay: -12s; }
.section-particle:nth-child(3) { left: 50%; animation-delay: -25s; }
.section-particle:nth-child(4) { left: 70%; animation-delay: -38s; }
.section-particle:nth-child(5) { left: 90%; animation-delay: -50s; }

/* ===== GLOBAL BACKGROUND PARTICLES ===== */
/* 🖥️ DESKTOP: 20+ floating particles with full animations */
/* 📱 MOBILE: 5 particles with simplified animations */
/* Global particle container that covers entire viewport */
.global-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Individual global particles */
.global-particle {
  position: absolute;
  font-size: 15px;
  opacity: 0.15;
  animation: globalFloat 60s linear infinite;
}

/* Different colors and speeds for variety */
.global-particle:nth-child(4n+1) {
  color: rgba(34, 211, 238, 0.2);
  animation-duration: 45s;
}

.global-particle:nth-child(4n+2) {
  color: rgba(34, 197, 94, 0.2);
  animation-duration: 55s;
}

.global-particle:nth-child(4n+3) {
  color: rgba(168, 85, 247, 0.15);
  animation-duration: 65s;
}

.global-particle:nth-child(4n) {
  color: rgba(251, 191, 36, 0.18);
  animation-duration: 50s;
}

/* Distribute particles across entire viewport width */
.global-particle:nth-child(1) { left: 5%; animation-delay: 0s; }
.global-particle:nth-child(2) { left: 15%; animation-delay: -8s; }
.global-particle:nth-child(3) { left: 25%; animation-delay: -16s; }
.global-particle:nth-child(4) { left: 35%; animation-delay: -24s; }
.global-particle:nth-child(5) { left: 45%; animation-delay: -32s; }
.global-particle:nth-child(6) { left: 55%; animation-delay: -40s; }
.global-particle:nth-child(7) { left: 65%; animation-delay: -48s; }
.global-particle:nth-child(8) { left: 75%; animation-delay: -56s; }
.global-particle:nth-child(9) { left: 85%; animation-delay: -4s; }
.global-particle:nth-child(10) { left: 95%; animation-delay: -12s; }
.global-particle:nth-child(11) { left: 10%; animation-delay: -20s; }
.global-particle:nth-child(12) { left: 20%; animation-delay: -28s; }
.global-particle:nth-child(13) { left: 30%; animation-delay: -36s; }
.global-particle:nth-child(14) { left: 40%; animation-delay: -44s; }
.global-particle:nth-child(15) { left: 50%; animation-delay: -52s; }
.global-particle:nth-child(16) { left: 60%; animation-delay: -60s; }
.global-particle:nth-child(17) { left: 70%; animation-delay: -6s; }
.global-particle:nth-child(18) { left: 80%; animation-delay: -14s; }
.global-particle:nth-child(19) { left: 90%; animation-delay: -22s; }
.global-particle:nth-child(20) { left: 8%; animation-delay: -30s; }

/* Global particle animation - continuous floating */
@keyframes globalFloat {
  0% {
    transform: translateY(calc(100vh + 50px)) rotate(0deg);
    opacity: 0;
  }
  3% {
    opacity: 0.15;
  }
  97% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(-50px) rotate(360deg);
    opacity: 0;
  }
}

/* Mobile Performance: Reduce particle count and effects - MOBILE ONLY */
@media (max-width: 768px) {
  /* Reduce global particles on mobile ONLY - Desktop keeps all particles */
  .global-particle:nth-child(n+6) {
    display: none !important;
  }
  
  /* Simplify remaining particles on mobile ONLY */
  .global-particle {
    animation-duration: 30s !important;
    opacity: 0.08 !important;
  }
  
  /* Disable section particles on mobile ONLY - Desktop keeps them */
  .section-particles {
    display: none !important;
  }
  
  /* Optimize loading screen animations for mobile ONLY */
  .dna-helix {
    animation-duration: 8s !important;
  }
  
  .lab-item {
    animation: none !important;
    opacity: 0.15 !important;
  }
  
  .scanning-line,
  .scanning-line-vertical {
    display: none !important;
  }
  
  .loading-particles {
    display: none !important;
  }
  
  /* Hide data stream effect on mobile - it's lagging */
  .data-stream-container {
    display: none !important;
  }
  
  /* Hide DNA helix logo animation on mobile - it's lagging */
  .dna-helix-container {
    display: none !important;
  }
  
  /* Hide flashing loading dots on mobile - they're lagging */
  .loading-dots {
    display: none !important;
  }
  
  /* Show mobile desktop warning only on mobile */
  .mobile-desktop-warning {
    display: block !important;
  }
  
  /* Disable backdrop blur effects on mobile ONLY for better performance */
  .backdrop-blur-sm,
  .backdrop-blur-strong {
    backdrop-filter: none !important;
    background-color: rgba(0, 0, 0, 0.4) !important; /* Subtle dark like team cards */
  }
  
  /* Ensure all cards have consistent subtle dark backgrounds on mobile */
  .bg-black\/90,
  .bg-black\/80,
  .bg-black\/70,
  .bg-black\/60,
  .bg-black\/50,
  .bg-black\/40 {
    background-color: rgba(0, 0, 0, 0.4) !important; /* Consistent subtle darkness */
  }
  
  /* Specific card elements that might be too dark */
  .post-card,
  .team-member,
  [class*="bg-black"] {
    background-color: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(55, 65, 81, 0.3) !important; /* Subtle border */
  }
  
  /* Progress section cards and similar elements */
  .timeline-content,
  #contact-form,
  #audio-player .bg-black\/90 {
    background-color: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(55, 65, 81, 0.3) !important;
  }
  
  /* Any div with dark background classes */
  div[class*="bg-black"],
  div[class*="bg-gray-900"],
  div[class*="bg-slate-800"] {
    background-color: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(55, 65, 81, 0.3) !important;
  }
  
  /* Override any overly dark backgrounds with consistent subtle darkness */
  .bg-opacity-90,
  .bg-opacity-80,
  .bg-opacity-70 {
    background-color: rgba(0, 0, 0, 0.4) !important;
  }
  
  /* Ensure project progress cards and similar have good contrast */
  .rounded-lg.p-6,
  .rounded-lg.p-8,
  .rounded-xl.p-6,
  .rounded-xl.p-8 {
    background-color: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(55, 65, 81, 0.3) !important;
  }
}

/* Scrolling performance optimization */
@media (max-width: 768px) {
  /* Reduce visual effects during scrolling */
  body.scrolling * {
    animation-play-state: paused !important;
    transition: none !important;
    box-shadow: none !important;
  }
  
  /* Keep essential elements visible during scroll */
  body.scrolling .nav-btn,
  body.scrolling #audio-player,
  body.scrolling .corner-scanner {
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* Simplify content rendering during scroll */
  body.scrolling .hover-lift:hover {
    transform: none !important;
    box-shadow: none !important;
  }
}

/* Mobile-specific background fixes ONLY - Desktop unchanged */
@media (max-width: 768px) {
  /* Prevent white background flashes on mobile ONLY */
  html, body {
    background-color: #1e293b !important; /* Fallback dark background */
    min-height: 100vh;
  }

  /* Ensure content always has background on mobile */
  #main-content {
    background: inherit;
    min-height: 100vh;
  }

  /* Force background on all sections on mobile */
  .section {
    background: transparent;
    position: relative;
  }
  
  /* Ensure consistent background during scroll on mobile */
  html, body, #main-content {
    background-color: #1e293b !important;
  }
  
  /* Prevent background flashing during transitions on mobile */
  * {
    background-attachment: scroll !important;
  }
  
  /* Force repaint prevention on mobile */
  body {
    contain: layout style paint;
  }
}

/* ===== SUBTLE SCANNING EFFECT ===== */

@keyframes scanLine {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: translateX(100vw);
    opacity: 0;
  }
}

/* Scanning line overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(34, 211, 238, 0.8) 50%, 
    transparent 100%);
  pointer-events: none;
  z-index: 2;
  animation: scanLine 120s ease-in-out infinite;
}

/* ===== AUDIO PLAYER STYLES ===== */

/* Audio player container */
#audio-player {
  transition: all 0.3s ease;
}

#audio-player:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Volume slider styling */
.volume-slider {
  background: #374151;
  outline: none;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #22d3ee;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
  transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  background: #06b6d4;
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.8);
  transform: scale(1.1);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #22d3ee;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
  transition: all 0.3s ease;
}

.volume-slider::-moz-range-thumb:hover {
  background: #06b6d4;
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.8);
  transform: scale(1.1);
}

.volume-slider::-webkit-slider-track {
  background: linear-gradient(to right, #22d3ee 0%, #374151 0%);
  height: 8px;
  border-radius: 9999px;
}

.volume-slider::-moz-range-track {
  background: #374151;
  height: 8px;
  border-radius: 9999px;
  border: none;
}

/* Audio player buttons */
#play-pause-btn, #volume-btn {
  transition: all 0.3s ease;
}

#play-pause-btn:hover, #volume-btn:hover {
  transform: scale(1.1);
  text-shadow: 0 0 10px currentColor;
}

/* Audio player animations */
@keyframes audioWave {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

#play-pause-btn.playing {
  animation: audioWave 2s ease-in-out infinite;
}

/* Mobile audio player adjustments */
@media (max-width: 768px) {
  #audio-player {
    bottom: 2rem;
    right: 1rem;
  }
  
  #audio-player .bg-black\/90 {
    padding: 0.75rem;
  }
  
  .volume-slider {
    width: 60px;
  }
}

/* ===== ENHANCED LOADING SCREEN ANIMATIONS ===== */

/* Lab Grid Background */
.lab-grid {
  background-image: 
    linear-gradient(rgba(34, 211, 238, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.3; }
}

/* Scanning Lines */
.scanning-line {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.8), transparent);
  animation: scanHorizontal 3s linear infinite;
}

.scanning-line-vertical {
  position: absolute;
  top: -100%;
  left: 50%;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(34, 197, 94, 0.6), transparent);
  animation: scanVertical 4s linear infinite;
  animation-delay: 1.5s;
}

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

@keyframes scanVertical {
  0% { top: -100%; }
  100% { top: 100%; }
}

/* Lab Equipment Floating */
.lab-equipment {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lab-item {
  position: absolute;
  font-size: 2rem;
  opacity: 0.3;
  animation: labFloat 6s ease-in-out infinite;
}

.lab-item:nth-child(2n) {
  animation-delay: -2s;
  animation-duration: 8s;
}

.lab-item:nth-child(3n) {
  animation-delay: -4s;
  animation-duration: 7s;
}

@keyframes labFloat {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg);
    opacity: 0.2;
  }
  50% { 
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.4;
  }
}

/* DNA Helix Animation */
.dna-helix-container {
  perspective: 1000px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dna-helix {
  position: relative;
  width: 80px;
  height: 100px;
  animation: helixRotate 4s linear infinite;
}

.dna-strand {
  position: absolute;
  width: 4px;
  height: 100%;
  border-radius: 2px;
  top: 0;
}

.strand-1 {
  left: 20px;
  background: linear-gradient(180deg, #22d3ee, #3b82f6);
  animation: strandWave 2s ease-in-out infinite;
}

.strand-2 {
  right: 20px;
  background: linear-gradient(180deg, #22c55e, #16a34a);
  animation: strandWave 2s ease-in-out infinite;
  animation-delay: 1s;
}

.dna-base-pairs {
  position: absolute;
  width: 100%;
  height: 100%;
}

.base-pair {
  position: absolute;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #22d3ee, #22c55e);
  left: 10px;
  border-radius: 1px;
  animation: basePairPulse 1s ease-in-out infinite;
}

.base-pair:nth-child(1) { top: 10%; animation-delay: 0s; }
.base-pair:nth-child(2) { top: 25%; animation-delay: 0.2s; }
.base-pair:nth-child(3) { top: 40%; animation-delay: 0.4s; }
.base-pair:nth-child(4) { top: 55%; animation-delay: 0.6s; }
.base-pair:nth-child(5) { top: 70%; animation-delay: 0.8s; }
.base-pair:nth-child(6) { top: 85%; animation-delay: 1s; }

@keyframes helixRotate {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

@keyframes strandWave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.1); }
}

@keyframes basePairPulse {
  0%, 100% { 
    opacity: 0.6;
    transform: scaleX(1);
  }
  50% { 
    opacity: 1;
    transform: scaleX(1.2);
  }
}

/* Loading Dots Animation */
.loading-dots {
  animation: loadingDots 1.5s ease-in-out infinite;
}

@keyframes loadingDots {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

/* System Status Lines */
.system-status {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.status-line {
  display: flex;
  align-items: center;
  opacity: 0;
  animation: statusAppear 0.5s ease-out forwards;
}

.status-line:nth-child(1) { animation-delay: 1s; }
.status-line:nth-child(2) { animation-delay: 2s; }
.status-line:nth-child(3) { animation-delay: 3s; }
.status-line:nth-child(4) { animation-delay: 4s; }

@keyframes statusAppear {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}

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

/* Typewriter Effect */
.typewriter {
  overflow: hidden;
  white-space: nowrap;
  animation: typewriter 2s steps(40, end) forwards;
}

@keyframes typewriter {
  0% { width: 0; }
  100% { width: 100%; }
}

/* Loading Progress Bar Glow */
.loading-bar-glow {
  box-shadow: 
    0 0 10px rgba(34, 211, 238, 0.5),
    0 0 20px rgba(34, 211, 238, 0.3),
    0 0 30px rgba(34, 211, 238, 0.1);
  animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
  0%, 100% {
    box-shadow: 
      0 0 10px rgba(34, 211, 238, 0.5),
      0 0 20px rgba(34, 211, 238, 0.3),
      0 0 30px rgba(34, 211, 238, 0.1);
  }
  50% {
    box-shadow: 
      0 0 15px rgba(34, 211, 238, 0.8),
      0 0 30px rgba(34, 211, 238, 0.5),
      0 0 45px rgba(34, 211, 238, 0.2);
  }
}

/* Loading Particles */
.loading-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.8), transparent);
  border-radius: 50%;
  animation: particleFloat 8s linear infinite;
}

.particle:nth-child(1) {
  left: 20%;
  animation-delay: 0s;
  animation-duration: 6s;
}

.particle:nth-child(2) {
  left: 40%;
  animation-delay: -2s;
  animation-duration: 8s;
}

.particle:nth-child(3) {
  left: 60%;
  animation-delay: -4s;
  animation-duration: 7s;
}

.particle:nth-child(4) {
  left: 80%;
  animation-delay: -6s;
  animation-duration: 9s;
}

.particle:nth-child(5) {
  left: 10%;
  animation-delay: -8s;
  animation-duration: 5s;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: scale(1);
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) scale(0);
    opacity: 0;
  }
}

/* Enhanced Loading Screen Background */
#loading-screen {
  background: 
    radial-gradient(ellipse at center, rgba(34, 211, 238, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

/* Mobile Responsive Adjustments for Loading Screen */
@media (max-width: 768px) {
  /* DNA helix is hidden on mobile, no need for sizing */
  
  /* Professional mobile loading screen styling */
  .loading-text-container {
    padding: 0 0.25rem;
    max-width: 100%;
    margin: 0 auto;
  }
  
  .loading-text-container h2 {
    font-size: 1.4rem;
    margin-bottom: 0rem;
    line-height: 1.4;
  }
  
  .system-status {
    font-size: 0.75rem;
    padding: 0;
    margin: 0 auto;
    max-width: 420px;
  }
  
  .lab-item {
    font-size: 1.2rem;
  }
  
  /* Mobile warning styling */
  .mobile-desktop-warning {
    margin: 0 1rem 1.5rem 1rem;
  }
  
  .mobile-desktop-warning .bg-yellow-600\/20 {
    padding: 0.75rem;
    margin: 0 auto;
    max-width: 280px;
  }
  
  .mobile-desktop-warning .text-xs {
    font-size: 0.7rem;
    line-height: 1.4;
  }
  
  /* Progress bar container on mobile */
  .loading-text-container .mt-8 {
    margin-top: 1.5rem;
    padding: 0 0.5rem;
  }
  
  .loading-text-container .w-80 {
    max-width: 420px;
    width: 100%;
  }
  
  /* Main loading content spacing on mobile */
  #loading-screen .text-center {
    padding: 2rem 1rem;
    margin-top: -2rem; /* Adjust vertical centering */
  }
  
  /* Status line spacing on mobile */
  .status-line {
    margin-bottom: 0.5rem;
    padding: 0 0.25rem;
  }
  
  /* Loading percentage and progress text */
  .loading-text-container .text-sm {
    font-size: 0.75rem;
  }
  
  /* Better spacing for loading elements */
  .loading-text-container > * {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Extra small mobile devices (very small phones) */
@media (max-width: 480px) {
  .loading-text-container h2 {
    font-size: 1.2rem !important;
    margin-bottom: 1rem !important;
  }
  
  .system-status {
    font-size: 0.8rem !important;
    max-width: 440px !important;
    padding: 0 !important;
  }
  
  .mobile-desktop-warning .bg-yellow-600\/20 {
    padding: 0.5rem !important;
    max-width: 260px !important;
  }
  
  .mobile-desktop-warning .text-xs {
    font-size: 0.85rem !important;
  }
  /* DNA helix is completely hidden on mobile, no need for sizing */
  
  
  #loading-screen .text-center {
    padding: 1rem 0.5rem !important;
  }
  
  /* Fix DNA helix mobile display */
  .dna-strand {
    width: 3px;
  }
  
  .base-pair {
    width: 50px;
    left: 10px;
  }
  
  /* Mobile card improvements */
  .emoji-img-large {
    width: 1.8em;
    height: 1.8em;
  }
  
  /* Make main card titles bigger on mobile */
  .text-2xl.font-bold.text-cyan-400,
  .text-2xl.font-bold.text-green-400 {
    font-size: 1.75rem !important;
  }
  
  /* Keep 3-card sections as default mobile behavior */
}

/* Additional mobile improvements for specific sections */
@media (max-width: 640px) {
  /* Make main completion text bigger on mobile for better readability */
  h3.text-2xl.font-bold {
    font-size: 1.8rem !important;
    line-height: 1.3;
  }
  
  /* Adjust subtitle text */
  p.text-gray-300 {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  /* Force horizontal layout for Dinosaur and Plant lab stats cards on mobile */
  .grid.md\\:grid-cols-3.gap-8 {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 0.5rem !important;
  }
  
  /* Adjust padding and text size for the stats cards */
  .grid.md\\:grid-cols-3.gap-8 > div {
    padding: 0.75rem !important;
  }
  
  .grid.md\\:grid-cols-3.gap-8 .text-2xl {
    font-size: 1rem !important;
  }
  
  .grid.md\\:grid-cols-3.gap-8 .text-gray-400 {
    font-size: 0.7rem !important;
  }
  
  .grid.md\\:grid-cols-3.gap-8 .emoji-img-large {
    width: 1.2em !important;
    height: 1.2em !important;
  }
  
  /* Fix main card layout on mobile */
  .bg-gradient-to-br .inline-block {
    padding: 1.5rem !important;
  }
  
  /* Improve mobile spacing */
  .bg-gradient-to-br.p-8 {
    padding: 1.5rem !important;
  }
  
  /* Ensure proper text scaling on very small screens */
  .text-6xl {
    font-size: 3rem !important;
  }
}

/* ===== MAIN WEBSITE LAB ATMOSPHERE EFFECTS ===== */

/* Lab Atmosphere Container */
.lab-atmosphere {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Subtle Scanning Grid */
.lab-scan-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 100px 100px;
  animation: gridScan 20s linear infinite;
}

@keyframes gridScan {
  0% { 
    background-position: 0 0;
    opacity: 0.3;
  }
  50% { 
    background-position: 50px 50px;
    opacity: 0.6;
  }
  100% { 
    background-position: 100px 100px;
    opacity: 0.3;
  }
}

/* Ambient Lab Particles */
.lab-ambient-particles {
  position: absolute;
  inset: 0;
}

.ambient-particle {
  position: absolute;
  font-size: 1.2rem;
  color: rgba(34, 211, 238, 0.15);
  animation: ambientFloat 60s linear infinite;
  opacity: 0;
}

.ambient-particle:nth-child(2n) {
  color: rgba(34, 197, 94, 0.12);
  animation-duration: 80s;
}

.ambient-particle:nth-child(3n) {
  color: rgba(168, 85, 247, 0.1);
  animation-duration: 70s;
}

.ambient-particle:nth-child(1) { left: 5%; animation-delay: 0s; }
.ambient-particle:nth-child(2) { left: 15%; animation-delay: -10s; }
.ambient-particle:nth-child(3) { left: 25%; animation-delay: -20s; }
.ambient-particle:nth-child(4) { left: 35%; animation-delay: -30s; }
.ambient-particle:nth-child(5) { left: 45%; animation-delay: -40s; }
.ambient-particle:nth-child(6) { left: 55%; animation-delay: -50s; }
.ambient-particle:nth-child(7) { left: 75%; animation-delay: -60s; }
.ambient-particle:nth-child(8) { left: 85%; animation-delay: -70s; }

@keyframes ambientFloat {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  5% {
    opacity: 0.3;
  }
  95% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Corner Scanners */
.corner-scanner {
  position: fixed !important;
  width: 40px;
  height: 40px;
  z-index: 9999 !important; /* Super high to ensure visibility */
  pointer-events: none; /* Don't interfere with clicks */
  display: block !important;
}

/* Create the actual corner lines using pseudo-elements */
.corner-scanner::before,
.corner-scanner::after {
  content: '';
  position: absolute;
  background-color: currentColor;
  animation: scanCycle 35s ease-in-out infinite;
}

/* Top-left corner: ⌜ */
.corner-scanner.top-left {
  top: 80px;
  left: 20px;
  color: rgba(34, 211, 238, 0.9);
  animation-delay: 0s;
}

.corner-scanner.top-left::before {
  /* Horizontal line */
  width: 25px;
  height: 3px;
  top: 0;
  left: 0;
}

.corner-scanner.top-left::after {
  /* Vertical line */
  width: 3px;
  height: 25px;
  top: 0;
  left: 0;
}

/* Top-right corner: ⌝ */
.corner-scanner.top-right {
  top: 80px;
  right: 20px;
  color: rgba(34, 197, 94, 0.9);
  animation-delay: 8s;
}

.corner-scanner.top-right::before {
  /* Horizontal line */
  width: 25px;
  height: 3px;
  top: 0;
  right: 0;
}

.corner-scanner.top-right::after {
  /* Vertical line */
  width: 3px;
  height: 25px;
  top: 0;
  right: 0;
}

/* Bottom-left corner: ⌞ */
.corner-scanner.bottom-left {
  bottom: 20px;
  left: 20px;
  color: rgba(168, 85, 247, 0.9);
  animation-delay: 16s;
}

.corner-scanner.bottom-left::before {
  /* Horizontal line */
  width: 25px;
  height: 3px;
  bottom: 0;
  left: 0;
}

.corner-scanner.bottom-left::after {
  /* Vertical line */
  width: 3px;
  height: 25px;
  bottom: 0;
  left: 0;
}

/* Bottom-right corner: ⌟ */
.corner-scanner.bottom-right {
  bottom: 20px;
  right: 20px;
  color: rgba(34, 211, 238, 0.9);
  animation-delay: 24s;
}

.corner-scanner.bottom-right::before {
  /* Horizontal line */
  width: 25px;
  height: 3px;
  bottom: 0;
  right: 0;
}

.corner-scanner.bottom-right::after {
  /* Vertical line */
  width: 3px;
  height: 25px;
  bottom: 0;
  right: 0;
}

/* Scan cycle: 30 seconds hidden, 5 seconds visible */
@keyframes scanCycle {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  
  /* Stay hidden for 30 seconds (85.7% of 35s cycle) */
  85.7% {
    opacity: 0;
    transform: scale(0.8);
  }
  
  /* Quick fade in */
  87% {
    opacity: 0.8;
    transform: scale(1);
    box-shadow: 0 0 10px currentColor;
  }
  
  /* Peak scan effect */
  91% {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 20px currentColor;
  }
  
  /* Fade out */
  95% {
    opacity: 0.8;
    transform: scale(1);
    box-shadow: 0 0 10px currentColor;
  }
  
  /* Back to hidden */
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* Data Stream Effects */
.data-stream-container {
  position: absolute;
  inset: 0;
}

.data-stream {
  position: absolute;
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: rgba(34, 211, 238, 0.2);
  white-space: nowrap;
  animation: dataFlow 15s linear infinite;
  opacity: 0;
}

.stream-1 {
  top: 20%;
  right: -200px;
  animation-delay: 0s;
}

.stream-2 {
  top: 60%;
  right: -200px;
  animation-delay: -5s;
  color: rgba(34, 197, 94, 0.15);
}

.stream-3 {
  top: 80%;
  right: -200px;
  animation-delay: -10s;
  color: rgba(168, 85, 247, 0.1);
}

@keyframes dataFlow {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateX(-100vw);
    opacity: 0;
  }
}

/* Enhanced Card Hover Effects */
.hover-lift {
  transition: all 0.3s ease;
  position: relative;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(34, 211, 238, 0.1);
}

.hover-lift:hover::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, 
    rgba(34, 211, 238, 0.1), 
    rgba(34, 197, 94, 0.1), 
    rgba(168, 85, 247, 0.1));
  border-radius: inherit;
  z-index: -1;
  animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* Navigation Enhancement */
.nav-btn {
  position: relative;
  overflow: hidden;
}

.nav-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.2), transparent);
  transition: left 0.5s ease;
}

.nav-btn:hover::before {
  left: 100%;
}

.nav-btn:hover {
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.3);
}

/* Progress Bar Enhancements */
.progress-container {
  position: relative;
}

.progress-container::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, 
    rgba(34, 211, 238, 0.3), 
    rgba(34, 197, 94, 0.3));
  border-radius: inherit;
  z-index: -1;
  animation: progressContainerGlow 3s ease-in-out infinite;
}

@keyframes progressContainerGlow {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.6; }
}

/* Interactive Elements Pulse - Completely Removed */
.interactive-pulse {
  /* No animation or pulse effects */
  animation: none !important;
  box-shadow: none !important;
  transition: none !important;
}

/* Subtle Text Glow on Hover */
.text-glow-hover {
  transition: text-shadow 0.3s ease;
}

.text-glow-hover:hover {
  text-shadow: 0 0 10px currentColor;
}

/* Fix mobile flickering for text-glow-hover */
@media (max-width: 768px) {
  .text-glow-hover {
    /* Completely disable all hover effects on mobile */
    transition: none !important;
    /* Provide a subtle static glow instead of hover effect */
    text-shadow: 0 0 5px currentColor !important;
  }
  
  .text-glow-hover:hover,
  .text-glow-hover:active,
  .text-glow-hover:focus {
    /* Force same static glow on all states to prevent flickering */
    text-shadow: 0 0 5px currentColor !important;
    transition: none !important;
  }
  
  /* Disable touch-based hover states completely */
  @media (hover: none) and (pointer: coarse) {
    .text-glow-hover:hover {
      text-shadow: 0 0 5px currentColor !important;
    }
  }
  
  /* Mobile button optimizations */
  button {
    /* Prevent button scaling issues on mobile */
    transform: none !important;
    /* Reduce transition effects that can cause lag */
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
  }
  
  button:hover,
  button:active,
  button:focus {
    /* Disable transform effects on mobile */
    transform: none !important;
  }
  
  /* Ensure CTA buttons work well on mobile */
  .hover-lift {
    transform: none !important;
  }
  
  .hover-lift:hover {
    transform: none !important;
    box-shadow: none !important;
  }
  
  /* Make buttons more compact on mobile */
  button {
    padding: 0.5rem 1rem !important; /* Override py-2 px-6 for even smaller buttons */
    font-size: 0.875rem !important; /* text-sm instead of text-base */
    line-height: 1.25rem !important;
  }
  
  /* Ensure button content is properly centered and compact */
  button span {
    gap: 0.375rem !important; /* Reduce space between icon and text */
  }
  
  /* Make emoji icons slightly smaller on mobile */
  button .emoji-img-small {
    width: 1rem !important;
    height: 1rem !important;
  }
}

/* Mobile Adjustments for Lab Effects */
@media (max-width: 768px) {
  .lab-scan-grid {
    background-size: 50px 50px;
  }
  
  .ambient-particle {
    font-size: 1rem;
  }
  
  .corner-scanner {
    width: 30px;
    height: 30px;
  }
  
  .corner-scanner.top-left,
  .corner-scanner.top-right {
    top: 70px; /* Adjust for smaller mobile nav */
  }
  
  .corner-scanner.bottom-left,
  .corner-scanner.bottom-right {
    bottom: 10px; /* Close to bottom edge on mobile */
  }
  
  /* Smaller lines on mobile */
  .corner-scanner::before {
    width: 20px !important;
    height: 2px !important;
  }
  
  .corner-scanner::after {
    width: 2px !important;
    height: 20px !important;
  }
  
  .data-stream {
    font-size: 0.6rem;
  }
  
  .hover-lift:hover {
    transform: translateY(-4px);
  }
  
  /* Mobile-specific adjustments for Research Gallery Velociraptor image */
  /* Make the featured dinosaur image more mobile-friendly */
  #gallery-content .h-96 {
    height: 240px !important; /* Reduce from 384px to 240px for better mobile aspect ratio */
    max-height: 50vh; /* Ensure it doesn't take up too much screen height */
  }
  
  /* Further optimize for very small screens */
  @media (max-width: 480px) {
    #gallery-content .h-96 {
      height: 200px !important; /* Even smaller for phones */
      max-height: 40vh;
    }
  }
  
  /* Mobile spacing fixes - Add proper spacing between navigation and content */
  main {
    padding-top: 1.5rem !important; /* Add extra top padding on mobile for better spacing */
    padding-bottom: 1.5rem !important;
  }
  
  /* Hero section mobile adjustments for better spacing */
  #home-section .py-4 {
    padding-top: 2rem !important; /* Add more breathing room on mobile */
    padding-bottom: 2rem !important;
  }
  
  /* Ensure all section headings have proper top spacing on mobile */
  .section h2:first-child,
  .section h1:first-child {
    margin-top: 1rem !important;
  }
  
  /* Better spacing for mobile navigation when open */
  #mobile-nav {
    margin-bottom: 1rem;
  }
  
  /* Ensure proper spacing for all sections on mobile */
  .section {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
  
  /* Add extra spacing to section titles on mobile */
  .section > h2 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  /* Improve spacing for mobile cards and content blocks */
  .bg-black\/40,
  .bg-black\/30 {
    margin-bottom: 1rem !important;
  }
  
  /* Better mobile spacing for the first visible content after nav */
  .section:first-child,
  .section.active:first-child {
    padding-top: 2rem !important;
  }
  
  /* Specific adjustments for better mobile readability */
  .text-7xl {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }
  
  /* Improve spacing around key stat cards on mobile */
  .grid.grid-cols-3 {
    gap: 0.75rem !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  /* Add breathing room to progress sections on mobile */
  .bg-black\/40.backdrop-blur-sm {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }
  
  /* Mobile-specific adjustments for Research Usage Statistics on Tools page */
  /* Force horizontal layout on mobile instead of vertical */
  #research-usage-stats {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.5rem !important;
  }
  
  /* Make the statistics smaller and more compact on mobile */
  #research-usage-stats .text-center {
    padding: 0.5rem 0.25rem !important;
  }
  
  /* Reduce font sizes for mobile statistics */
  #research-usage-stats .text-3xl {
    font-size: 1.25rem !important; /* Much smaller than text-3xl */
    line-height: 1.2 !important;
    margin-bottom: 0.25rem !important;
  }
  
  /* Make labels smaller and more compact */
  #research-usage-stats .text-sm {
    font-size: 0.6875rem !important; /* Very small labels */
    line-height: 1.1 !important;
    padding: 0 0.125rem !important;
    word-wrap: break-word !important;
  }
  
  /* Further optimize for very small screens */
  @media (max-width: 480px) {
    #research-usage-stats {
      gap: 0.25rem !important;
    }
    
    #research-usage-stats .text-3xl {
      font-size: 1rem !important; /* Even smaller on tiny screens */
    }
    
    #research-usage-stats .text-sm {
      font-size: 0.625rem !important; /* Tiny labels for small phones */
    }
  }
}

/* ===== INTERACTIVE ENERGY ORBS ===== */

/* Energy orb container */
.energy-orb {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  border-radius: 50%;
  animation: energyPulse 1.5s ease-out forwards;
}

/* Base energy orb animation */
@keyframes energyPulse {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 0.8;
  }
  100% {
    transform: scale(2) rotate(360deg);
    opacity: 0;
  }
}

/* Variant 1: Cyan Energy Orb */
.energy-orb.cyan {
  background: radial-gradient(circle, rgba(34, 211, 238, 0.8) 0%, rgba(34, 211, 238, 0.4) 50%, transparent 100%);
  box-shadow: 
    0 0 20px rgba(34, 211, 238, 0.6),
    0 0 40px rgba(34, 211, 238, 0.4),
    0 0 60px rgba(34, 211, 238, 0.2);
  width: 60px;
  height: 60px;
}

/* Variant 2: Green Energy Orb */
.energy-orb.green {
  background: radial-gradient(circle, rgba(34, 197, 94, 0.8) 0%, rgba(34, 197, 94, 0.4) 50%, transparent 100%);
  box-shadow: 
    0 0 20px rgba(34, 197, 94, 0.6),
    0 0 40px rgba(34, 197, 94, 0.4),
    0 0 60px rgba(34, 197, 94, 0.2);
  width: 80px;
  height: 80px;
  animation: energyPulseGreen 2s ease-out forwards;
}

/* Variant 3: Purple Energy Orb */
.energy-orb.purple {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.8) 0%, rgba(168, 85, 247, 0.4) 50%, transparent 100%);
  box-shadow: 
    0 0 20px rgba(168, 85, 247, 0.6),
    0 0 40px rgba(168, 85, 247, 0.4),
    0 0 60px rgba(168, 85, 247, 0.2);
  width: 50px;
  height: 50px;
  animation: energyPulsePurple 1.2s ease-out forwards;
}

/* Variant 4: Electric Blue Orb */
.energy-orb.electric {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.9) 0%, rgba(59, 130, 246, 0.5) 50%, transparent 100%);
  box-shadow: 
    0 0 25px rgba(59, 130, 246, 0.7),
    0 0 50px rgba(59, 130, 246, 0.5),
    0 0 75px rgba(59, 130, 246, 0.3);
  width: 70px;
  height: 70px;
  animation: energyPulseElectric 1.8s ease-out forwards;
}

/* Variant 5: Golden Energy Orb */
.energy-orb.gold {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.8) 0%, rgba(251, 191, 36, 0.4) 50%, transparent 100%);
  box-shadow: 
    0 0 20px rgba(251, 191, 36, 0.6),
    0 0 40px rgba(251, 191, 36, 0.4),
    0 0 60px rgba(251, 191, 36, 0.2);
  width: 90px;
  height: 90px;
  animation: energyPulseGold 2.5s ease-out forwards;
}

/* Custom animations for different variants */
@keyframes energyPulseGreen {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  30% {
    transform: scale(0.8) rotate(120deg);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.5) rotate(240deg);
    opacity: 0.5;
  }
  100% {
    transform: scale(2.5) rotate(360deg);
    opacity: 0;
  }
}

@keyframes energyPulsePurple {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  25% {
    transform: scale(1.5) rotate(90deg);
    opacity: 0.8;
  }
  50% {
    transform: scale(0.8) rotate(180deg);
    opacity: 0.9;
  }
  75% {
    transform: scale(1.8) rotate(270deg);
    opacity: 0.4;
  }
  100% {
    transform: scale(2.2) rotate(360deg);
    opacity: 0;
  }
}

@keyframes energyPulseElectric {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
    filter: brightness(1);
  }
  40% {
    transform: scale(1.3) rotate(144deg);
    opacity: 0.9;
    filter: brightness(1.5);
  }
  80% {
    transform: scale(1.8) rotate(288deg);
    opacity: 0.3;
    filter: brightness(0.8);
  }
  100% {
    transform: scale(2.3) rotate(360deg);
    opacity: 0;
    filter: brightness(0.5);
  }
}

@keyframes energyPulseGold {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  20% {
    transform: scale(0.6) rotate(72deg);
    opacity: 0.95;
  }
  40% {
    transform: scale(1.1) rotate(144deg);
    opacity: 0.8;
  }
  60% {
    transform: scale(1.6) rotate(216deg);
    opacity: 0.6;
  }
  80% {
    transform: scale(2.1) rotate(288deg);
    opacity: 0.3;
  }
  100% {
    transform: scale(2.8) rotate(360deg);
    opacity: 0;
  }
}

/* ===== AUDIO PLAYER ENHANCEMENTS ===== */

/* Enhanced audio player styling */
#audio-player {
  transition: all 0.3s ease;
}

#audio-player:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(34, 211, 238, 0.2);
}

/* Volume slider styling */
.volume-slider {
  background: linear-gradient(to right, #374151 0%, #374151 100%);
  outline: none;
  transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #22c55e);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.4);
  transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #22c55e);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.4);
  transition: all 0.3s ease;
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}

/* Audio player positioning adjustments for mobile */
@media (max-width: 768px) {
  /* Completely hide audio player on mobile devices */
  #audio-player {
    display: none !important;
  }
  
  /* Center the play/pause button better on mobile */
  #play-pause-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    min-height: 3rem;
  }

  .volume-slider {
    width: 60px;
  }
}

/* Hamburger Menu Styles */
.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background-color: #06b6d4; /* cyan-500 */
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger animation when active */
#mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

#mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

#mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Menu */
#mobile-nav {
  animation: slideDown 0.3s ease-out;
}

#mobile-nav.mobile-menu-open {
  animation: slideDown 0.3s ease-out;
}

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

/* Mobile navigation button styles */
.mobile-nav-btn {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: #e2e8f0;
  backdrop-filter: blur(4px);
  position: relative;
  overflow: hidden;
}

.mobile-nav-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.1), transparent);
  transition: left 0.5s ease;
}

.mobile-nav-btn:hover::before {
  left: 100%;
}

.mobile-nav-btn:hover {
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.4);
  color: #06b6d4;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
  transform: translateX(4px);
}

.mobile-nav-btn:hover img {
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.6));
  transform: scale(1.1);
}

.mobile-nav-btn.active {
  background: rgba(34, 211, 238, 0.2);
  border-color: #06b6d4;
  color: #06b6d4;
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.3);
}

.mobile-nav-btn.active img {
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.8));
}

/* Enhanced PNG emoji styling for mobile menu */
.mobile-nav-btn img {
  transition: all 0.3s ease;
  filter: brightness(1.1) contrast(1.1) saturate(1.2);
  width: 20px;
  height: 20px;
}

/* Add subtle glow to mobile menu emojis */
.mobile-nav-btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.05);
  transition: all 0.3s ease;
}

.mobile-nav-btn:hover span {
  background: rgba(34, 211, 238, 0.15);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.2);
}

/* Ensure mobile menu is properly positioned */
@media (max-width: 768px) {
  #mobile-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 40;
  }
}

/* Ensure desktop navigation is visible on larger screens */
@media (min-width: 769px) {
  #desktop-nav {
    display: flex !important;
  }
  
  #mobile-menu-btn {
    display: none !important;
  }
}

/* Additional mobile improvements for team section */
@media (max-width: 640px) {
  #team-section {
    padding: 1rem;
  }
  
  #team-content {
    padding: 0;
  }
  
  .team-member {
    margin: 0 auto;
    max-width: calc(100vw - 2rem);
  }
  
  .team-member h3 {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }
  
  .team-member p {
    font-size: 0.875rem;
    line-height: 1.5rem;
  }
  
  /* Fix mobile team avatar emoji positioning and size */
  .team-avatar img {
      transform: translateY(1.6rem) scale(1.6) !important; /* Move emoji down more to close gap */
  }
  
  .team-avatar .emoji-img-large {
    width: 10rem !important; /* Make emoji bigger on mobile */
    height: 10rem !important;
  }
}

/* ===== TIMELINE STYLES ===== */
.timeline-container {
  position: relative;
  padding: 2rem 0;
}

.timeline-line {
  height: 100%;
  min-height: 800px;
}

.timeline-item {
  position: relative;
  min-height: 120px;
}

.timeline-dot {
  z-index: 10;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
}

.timeline-year {
  z-index: 15;
  white-space: nowrap;
}

.timeline-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.timeline-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.timeline-card.current-milestone {
  border-color: rgba(34, 211, 238, 0.6) !important;
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.2);
}

.timeline-card.future-milestone {
  opacity: 0.7;
}

.timeline-details {
  transition: all 0.3s ease;
}

.timeline-details.show {
  display: block !important;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 200px;
  }
}

/* Mobile Timeline Adjustments */
@media (max-width: 768px) {
  .timeline-container {
    padding: 1rem 0;
    max-width: 100%;
    margin: 0 0.5rem;
  }
  
  .timeline-line {
    left: 1.5rem !important;
    transform: none !important;
  }
  
  .timeline-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding-left: 3.5rem;
    margin-bottom: 2rem;
  }
  
  .timeline-content {
    width: calc(100vw - 5rem) !important;
    max-width: calc(100% - 1.25rem) !important;
    padding: 0 !important;
    text-align: left !important;
    margin-right: 1.25rem;
  }
  
  .timeline-dot {
    left: 1.5rem !important;
    transform: none !important;
  }
  
  .timeline-year {
    left: 1.5rem !important;
    transform: translateX(-50%) translateY(-2rem) !important;
    font-size: 0.75rem;
  }
  
  .timeline-card {
    margin-right: 0.75rem;
    box-shadow: none !important;
  }
  
  .timeline-card:hover {
    box-shadow: none !important;
    transform: none !important;
  }
  
  .timeline-dot {
    box-shadow: none !important;
  }
  
  .timeline-card .flex {
    justify-content: flex-start !important;
  }
}

/* Extra small screens (360px and below) */
@media (max-width: 400px) {
  .timeline-container {
    padding: 0.5rem 0;
    margin: 0 0.75rem;
  }
  
  .timeline-item {
    padding-left: 2.5rem;
    margin-bottom: 1.5rem;
  }
  
  .timeline-content {
    width: calc(100vw - 5rem) !important;
    max-width: calc(100% - 1.5rem) !important;
    margin-right: 1rem;
  }
  
  .timeline-line {
    left: 1rem !important;
  }
  
  .timeline-dot {
    left: 1rem !important;
    width: 0.6rem;
    height: 0.6rem;
    box-shadow: none !important;
  }
  
  .timeline-year {
    left: 1rem !important;
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }
  
  .timeline-card {
    padding: 0.6rem !important;
    margin-right: 0.75rem;
    box-shadow: none !important;
  }
  
  .timeline-card:hover {
    box-shadow: none !important;
    transform: none !important;
  }
  
  .timeline-card h3 {
    font-size: 0.95rem !important;
    line-height: 1.1;
  }
  
  .timeline-card p {
    font-size: 0.7rem !important;
  }
  
  .timeline-card .flex {
    gap: 0.25rem !important;
  }
  
  .emoji-img-small {
    width: 1rem !important;
    height: 1rem !important;
  }
}

/* ===== AFEXCORE GALLERY STYLES ===== */
.afexcore-gallery .gallery-item {
  transition: all 0.3s ease;
}

.afexcore-gallery .gallery-item:hover {
  transform: translateY(-3px);
}

.afexcore-gallery img {
  transition: all 0.3s ease;
  cursor: pointer;
}

.afexcore-gallery img:hover {
  transform: scale(1.02);
}

/* Mobile optimizations for AfexCore gallery */
@media (max-width: 768px) {
  .afexcore-gallery .gallery-item {
    margin-bottom: 1rem;
  }
  
  .afexcore-gallery .gallery-item:hover {
    transform: none; /* Disable hover effects on mobile */
  }
  
  .afexcore-gallery img:hover {
    transform: none;
  }
  
  .afexcore-gallery h3 {
    font-size: 0.9rem !important;
  }
  
  .afexcore-gallery p {
    font-size: 0.8rem !important;
  }
}

@media (max-width: 400px) {
  .afexcore-gallery .gallery-item {
    padding: 0.75rem !important;
    margin-bottom: 0.75rem;
  }
  
  .afexcore-gallery .grid {
    gap: 0.75rem !important;
  }
  
  .afexcore-gallery h3 {
    font-size: 0.85rem !important;
    margin-bottom: 0.25rem !important;
  }
  
  .afexcore-gallery p {
    font-size: 0.75rem !important;
  }
}

/* ===== FAQ STYLES ===== */
.faq-category-btn {
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.faq-category-btn.active {
  background-color: rgba(34, 211, 238, 0.3) !important;
  border-color: rgba(34, 211, 238, 0.6) !important;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
}

.faq-item {
  transition: all 0.3s ease;
}

.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.faq-question {
  transition: all 0.3s ease;
}

.faq-question:hover {
  background-color: rgba(34, 211, 238, 0.05) !important;
}

.faq-arrow {
  transition: transform 0.3s ease;
  font-weight: bold;
  line-height: 1;
}

.faq-arrow.rotate {
  transform: rotate(45deg);
}

.faq-answer {
  transition: all 0.3s ease;
  max-height: 0;
  overflow: hidden;
}

.faq-answer.show {
  display: block !important;
  max-height: 500px;
  animation: expandAnswer 0.3s ease-out;
}

@keyframes expandAnswer {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

.faq-category {
  transition: all 0.3s ease;
}

.faq-category.hidden {
  display: none !important;
}

/* Mobile FAQ Adjustments */
@media (max-width: 768px) {
  .faq-category-btn {
    font-size: 0.875rem;
    padding: 0.75rem 1rem !important;
  }
  
  .faq-question {
    padding: 1rem !important;
    font-size: 1rem;
  }
  
  .faq-answer {
    padding: 1rem !important;
    padding-top: 0 !important;
  }
}