/* Custom CSS for Gravity Ion Thermoelectric Website */

/* CSS Reset and Base Styles */
* {
  box-sizing: border-box;
}

/* Navigation System Styles */
header {
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

header.scrolled {
  backdrop-filter: blur(10px);
  background-color: rgba(0, 0, 0, 0.8) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Navigation Link Styles */
.nav-link {
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #fbbf24);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 100%;
}

.nav-link.active {
  color: #fbbf24 !important;
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #fbbf24;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px #fbbf24;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.8;
  }
}

/* Mobile Menu Styles */
#mobile-menu {
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.9);
  border-radius: 8px;
  margin-top: 1rem;
  padding: 1rem;
}

#mobile-menu.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
}

#mobile-menu:not(.hidden) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mobile Menu Button Animation */
#mobile-menu-button {
  transition: all 0.3s ease;
}

#mobile-menu-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

#mobile-menu-button svg {
  transition: transform 0.3s ease;
}

#mobile-menu-button[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Navigation Focus States */
.nav-link:focus,
#mobile-menu-button:focus {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Navigation Accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  .nav-link::before,
  .nav-link.active::after,
  #mobile-menu {
    transition: none;
    animation: none;
  }
}

/* Call to Action Section Styles */
#call-to-action {
  position: relative;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

#call-to-action::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background: 
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(245, 158, 11, 0.06) 0%, transparent 50%);
  pointer-events: none;
  content: '';
}

/* CTA Button Animations */
.video-btn, .paper-btn, .social-btn, .copy-link-btn {
  position: relative;
  overflow: hidden;
}

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

.video-btn:hover::before, .paper-btn:hover::before {
  left: 100%;
}

/* Social Button Hover Effects */
.social-btn {
  transition: all 0.3s ease;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.facebook:hover { background-color: #1877f2 !important; }
.twitter:hover { background-color: #1da1f2 !important; }
.linkedin:hover { background-color: #0077b5 !important; }
.wechat:hover { background-color: #07c160 !important; }

/* Progress Bar Animations */
.progress-bar {
  animation: progressFill 2s ease-out;
}

@keyframes progressFill {
  from { width: 0%; }
  to { width: var(--target-width, 100%); }
}

/* Countdown Timer Effects */
.countdown-item {
  animation: countdownPulse 1s ease-in-out infinite alternate;
}

@keyframes countdownPulse {
  from { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  to { 
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
  }
}

/* Counter Animation */
.counter-item .text-lg {
  animation: counterUp 2s ease-out;
}

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

/* Newsletter Form Styles */
#newsletter-form input[type="email"]:focus {
  background-color: rgba(255, 255, 255, 0.3);
}

#newsletter-form button[type="submit"] {
  position: relative;
  overflow: hidden;
}

#newsletter-form button[type="submit"]::before {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
  content: '';
}

#newsletter-form button[type="submit"]:hover::before {
  left: 100%;
}

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  content: '';
}

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

/* Success/Error Feedback */
.feedback-success {
  color: #10b981;
  animation: fadeInUp 0.5s ease-out;
}

.feedback-error {
  color: #ef4444;
  animation: shake 0.5s ease-out;
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Responsive Design for CTA Section */
@media (max-width: 768px) {
  #call-to-action .primary-actions {
    grid-template-columns: 1fr;
  }
  
  #call-to-action .secondary-actions {
    grid-template-columns: 1fr;
  }
  
  #call-to-action .urgency-elements {
    grid-template-columns: 1fr;
  }
  
  .countdown-display {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .countdown-item {
    min-width: 50px;
  }
}

/* Academic Recognition Section Styles */
#academic-recognition {
  position: relative;
  background: linear-gradient(135deg, #581c87 0%, #3730a3 100%);
  overflow: hidden;
}

#academic-recognition::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background: 
    radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(245, 158, 11, 0.06) 0%, transparent 50%);
  pointer-events: none;
  content: '';
}

#academic-recognition > .container {
  position: relative;
  z-index: 2;
}

/* Glow effect for numbers */
.glow-effect {
  text-shadow: 0 0 20px currentColor, 0 0 40px currentColor, 0 0 60px currentColor;
  animation: glow-pulse 3s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
  from { text-shadow: 0 0 20px currentColor, 0 0 40px currentColor, 0 0 60px currentColor; }
  to { text-shadow: 0 0 30px currentColor, 0 0 60px currentColor, 0 0 90px currentColor; }
}

/* Counter animation */
@keyframes counter-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.counter-number {
  animation: counter-up 0.5s ease-out;
}

/* World map container styling */
#world-map {
  background: 
    radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(34, 197, 94, 0.08) 0%, transparent 50%);
  border-radius: 8px;
}

/* University carousel animation */
@keyframes scroll-logos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-scroll {
  animation: scroll-logos 30s linear infinite;
}

.logo-carousel:hover .animate-scroll {
  animation-play-state: paused;
}

/* Question cards hover effects */
.question-card {
  transition: all 0.3s ease;
}

.question-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Progress bars animation */
.progress-fill {
  transition: width 1s ease-in-out;
  animation: progress-grow 2s ease-out;
}

@keyframes progress-grow {
  from { width: 0; }
}

/* Response category cards */
.response-category {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.response-category::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.response-category:hover::before {
  opacity: 1;
}

/* Publication timeline styling */
.step-number {
  transition: all 0.3s ease;
}

.step-item:hover .step-number {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(168, 85, 247, 0.3);
}

/* Collaboration cards grid */
.collaboration-card {
  transition: all 0.3s ease;
}

.collaboration-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.collaboration-icon {
  transition: transform 0.3s ease;
}

.collaboration-card:hover .collaboration-icon {
  transform: scale(1.2) rotate(5deg);
}

/* Chart containers */
.chart-wrapper {
  position: relative;
  height: 300px;
}

.chart-wrapper canvas {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .counter-number {
    font-size: 4rem;
  }
  
  .statistics-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .questions-grid {
    grid-template-columns: 1fr;
  }
  
  .responses-categories {
    grid-template-columns: 1fr;
  }
  
  .collaboration-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .counter-number {
    font-size: 3rem;
  }
  
  .collaboration-grid {
    grid-template-columns: 1fr;
  }
}

/* Applications Impact Section Styles */
#applications-impact {
  position: relative;
  background: linear-gradient(135deg, rgb(240 253 244) 0%, rgb(239 246 255) 100%);
  overflow: hidden;
}

#applications-impact::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background: 
    radial-gradient(circle at 20% 30%, rgba(5, 150, 105, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(14, 165, 233, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
  pointer-events: none;
  content: '';
}

#applications-impact > .container {
  position: relative;
  z-index: 2;
}

/* Efficiency Calculator Styles */
.efficiency-calculator {
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.95);
}

.calculator-slider {
  opacity: 0.8;
  transition: opacity 0.3s;
  outline: none;
  border-radius: 4px;
  background: linear-gradient(to right, #d1d5db, #059669);
  width: 100%;
  height: 8px;
}

.calculator-slider:hover {
  opacity: 1;
}

.calculator-slider::-webkit-slider-thumb {
  appearance: none;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
  border-radius: 50%;
  background: #059669;
  width: 24px;
  height: 24px;
}

.calculator-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(5, 150, 105, 0.4);
}

.calculator-slider::-moz-range-thumb {
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
  border: none;
  border-radius: 50%;
  background: #059669;
  width: 24px;
  height: 24px;
}

/* Tech Specifications Cards */
.tech-spec-card {
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.9);
}

.tech-spec-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

.spec-value {
  background: linear-gradient(135deg, #059669, #0EA5E9);
  font-weight: 800;
  font-size: 2.5rem;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.spec-unit {
  color: #6b7280;
  font-weight: 500;
  font-size: 1rem;
}

/* Application Scenario Cards */
.application-card {
  position: relative;
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.95);
  overflow: hidden;
}

.application-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  transform: scaleX(0);
  transition: transform 0.3s ease;
  background: linear-gradient(90deg, #059669, #0EA5E9);
  height: 4px;
  content: '';
}

.application-card:hover::before {
  transform: scaleX(1);
}

.application-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.application-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.3);
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #0EA5E9);
  width: 80px;
  height: 80px;
}

.application-card:hover .application-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 32px rgba(5, 150, 105, 0.4);
}

/* Energy Comparison Table */
.energy-comparison-table {
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.95);
  overflow: hidden;
}

.energy-comparison-table th {
  background: linear-gradient(135deg, #059669, #0EA5E9);
  padding: 1rem;
  color: white;
  font-weight: 600;
  text-align: left;
}

.energy-comparison-table td {
  transition: background-color 0.2s ease;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  padding: 1rem;
}

.energy-comparison-table tr:hover td {
  background-color: rgba(5, 150, 105, 0.05);
}

.comparison-advantage {
  color: #059669;
  font-weight: 600;
}

.comparison-disadvantage {
  color: #ef4444;
  font-weight: 500;
}

.comparison-neutral {
  color: #6b7280;
  font-weight: 500;
}

/* Impact Metrics Cards */
.impact-metric-card {
  position: relative;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  overflow: hidden;
  text-align: center;
}

.impact-metric-card::before {
  position: absolute;
  top: -50%;
  left: -50%;
  animation: rotate 20s linear infinite;
  background: conic-gradient(from 0deg, transparent, rgba(5, 150, 105, 0.1), transparent);
  width: 200%;
  height: 200%;
  pointer-events: none;
  content: '';
}

.impact-metric-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.metric-value {
  background: linear-gradient(135deg, #059669, #0EA5E9, #8B5CF6);
  font-weight: 900;
  font-size: 3rem;
  -webkit-background-clip: text;
  position: relative;
  z-index: 2;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-label {
  position: relative;
  z-index: 2;
  margin-top: 0.5rem;
  color: #374151;
  font-weight: 600;
}

.metric-description {
  position: relative;
  z-index: 2;
  margin-top: 0.5rem;
  color: #6b7280;
  font-size: 0.875rem;
}

/* Economic Analysis Chart Container */
.economic-chart-container {
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem;
}

.chart-container {
  position: relative;
  margin: 1rem 0;
  height: 400px;
}

/* Development Roadmap Timeline */
.roadmap-timeline-container {
  padding: 2rem 0;
}

.timeline-line {
  opacity: 0.3;
  transition: opacity 0.3s ease;
  background: linear-gradient(to bottom, #059669 0%, #0EA5E9 30%, #8B5CF6 70%, #F59E0B 100%);
}

.milestone-marker {
  transition: all 0.3s ease;
}

.milestone-content {
  transition: all 0.3s ease;
}

.progress-bar {
  transition: all 0.3s ease;
  background: rgba(107, 114, 128, 0.3);
}

.progress-fill {
  transition: width 1s ease-out;
  background: linear-gradient(90deg, #059669, #0EA5E9);
}

/* Animations */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(5, 150, 105, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(5, 150, 105, 0.6);
  }
}

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

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

/* Responsive Design for Applications Impact */
@media (max-width: 768px) {
  .efficiency-calculator {
    padding: 1.5rem;
  }
  
  .spec-value {
    font-size: 2rem;
  }
  
  .metric-value {
    font-size: 2.5rem;
  }
  
  .chart-container {
    height: 300px;
  }
  
  .milestone-item {
    flex-direction: column;
    text-align: center;
  }
  
  .milestone-marker {
    margin: 0 auto 1rem;
  }
  
  .timeline-line {
    display: none;
  }
}

@media (max-width: 640px) {
  .application-card {
    margin-bottom: 1rem;
  }
  
  .energy-comparison-table {
    font-size: 0.875rem;
  }
  
  .energy-comparison-table th,
  .energy-comparison-table td {
    padding: 0.75rem;
  }
}

/* Scientific Breakthrough Section Styles */
#scientific-breakthrough {
  position: relative;
  background: linear-gradient(135deg, #111827 0%, #1e3a8a 25%, #312e81 50%, #1e293b 75%, #0f172a 100%);
  overflow: hidden;
}

#scientific-breakthrough::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background: 
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(138, 43, 226, 0.08) 0%, transparent 50%);
  pointer-events: none;
  content: '';
}

#scientific-breakthrough > .container {
  position: relative;
  z-index: 2;
}

/* Timeline Styles */
.timeline-container {
  padding-left: 2rem;
}

.timeline-line {
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
  background: linear-gradient(to bottom, #ffd700, #3b82f6);
}

.timeline-marker {
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.timeline-marker:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
}

.timeline-item:nth-child(2) .timeline-marker {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #3b82f6, #1e40af);
}

.timeline-item:nth-child(2) .timeline-marker:hover {
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.8);
}

.timeline-item:nth-child(3) .timeline-marker {
  box-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
  background: linear-gradient(135deg, #8a2be2, #6b21a8);
}

.timeline-item:nth-child(3) .timeline-marker:hover {
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.8);
}

/* Comparison Table Styles */
.comparison-table table {
  border-collapse: separate;
  border-spacing: 0;
}

.comparison-table th {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
}

.comparison-table tr:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.05);
}

/* Mechanism Steps Styles */
.mechanism-steps .step-card {
  position: relative;
  overflow: hidden;
}

.mechanism-steps .step-card::before {
  position: absolute;
  top: 0;
  left: -100%;
  transition: left 0.5s ease;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  width: 100%;
  height: 100%;
  content: '';
}

.mechanism-steps .step-card:hover::before {
  left: 100%;
}

/* Boltzmann Equation Styles */
.boltzmann-equation {
  position: relative;
}

.equation-container .main-equation {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60px;
  font-family: 'Times New Roman', serif;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.variable-explanations .variable {
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.variable-explanations .variable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 255, 255, 0.15) !important;
}

.variable-explanations .variable.active {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.2) !important;
}

/* Theory Comparison Cards */
.comparison-cards .comparison-card {
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.comparison-cards .comparison-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.comparison-cards .comparison-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(90deg, #ffd700, #3b82f6, #8a2be2);
  height: 4px;
  content: '';
}

.comparison-cards .comparison-card:hover::before {
  opacity: 1;
}

.traditional-view, .breakthrough-view {
  transition: all 0.3s ease;
}

.comparison-card:hover .traditional-view {
  opacity: 0.7;
}

.comparison-card:hover .breakthrough-view {
  transform: scale(1.02);
}

/* Interactive Simulation Styles */
.simulation-container {
  position: relative;
}

.simulation-controls {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* Custom Slider Styles */
.slider {
  transition: background 0.3s ease;
  outline: none;
  border-radius: 3px;
  background: #374151;
  width: 120px;
  height: 6px;
}

.slider:hover {
  background: #4b5563;
}

.slider::-webkit-slider-thumb {
  appearance: none;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #f59e0b);
  width: 18px;
  height: 18px;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.slider::-moz-range-thumb {
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #f59e0b);
  width: 18px;
  height: 18px;
}

/* Scientific Particle Canvas */
#scientific-particle-canvas {
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.9) 0%, rgba(0, 0, 0, 0.95) 100%);
}

.simulation-legend, .simulation-data {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-items .legend-item,
.data-items .data-item {
  transition: all 0.3s ease;
}

.legend-items .legend-item:hover,
.data-items .data-item:hover {
  transform: translateX(4px);
}

/* MathJax Integration */
.MathJax {
  color: inherit !important;
}

.MathJax_Display {
  color: #ffd700 !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Enhanced Animation Effects */
@keyframes scientific-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes equation-glow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
  }
  50% {
    text-shadow: 
      0 0 20px rgba(255, 215, 0, 0.6),
      0 0 30px rgba(255, 215, 0, 0.4);
  }
}

@keyframes particle-drift {
  0% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-10px) translateX(5px);
  }
  50% {
    transform: translateY(-5px) translateX(-8px);
  }
  75% {
    transform: translateY(-15px) translateX(3px);
  }
  100% {
    transform: translateY(0) translateX(0);
  }
}

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

.equation-animation {
  animation: equation-glow 4s ease-in-out infinite;
}

.particle-animation {
  animation: particle-drift 8s ease-in-out infinite;
}

/* Responsive Design for Scientific Section */
@media (max-width: 768px) {
  .timeline-container {
    padding-left: 1rem;
  }
  
  .timeline-marker {
    width: 12px;
    height: 12px;
    font-size: 10px;
  }
  
  .mechanism-steps {
    grid-template-columns: 1fr;
  }
  
  .comparison-cards {
    grid-template-columns: 1fr;
  }
  
  .simulation-controls {
    flex-direction: column;
    gap: 1rem;
  }
  
  .control-group {
    width: 100%;
  }
  
  .slider {
    width: 100%;
    max-width: 200px;
  }
  
  .variable-explanations {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .comparison-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .comparison-cards .comparison-card:nth-child(3) {
    grid-column: span 2;
    margin: 0 auto;
    max-width: 400px;
  }
}

/* Custom Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes glow {
  0% {
    filter: brightness(1);
    text-shadow:
      0 0 20px currentColor,
      0 0 30px currentColor,
      0 0 40px currentColor;
  }
  50% {
    filter: brightness(1.2);
    text-shadow:
      0 0 10px currentColor,
      0 0 20px currentColor,
      0 0 30px currentColor,
      0 0 40px currentColor,
      0 0 50px currentColor;
  }
  100% {
    filter: brightness(1);
    text-shadow:
      0 0 20px currentColor,
      0 0 30px currentColor,
      0 0 40px currentColor;
  }
}

@keyframes pulse-breathing {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes particle-float {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-15px) translateX(5px);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-5px) translateX(-10px);
    opacity: 1;
  }
  75% {
    transform: translateY(-20px) translateX(8px);
    opacity: 0.5;
  }
}

/* Enhanced Hero Section Styles */
#hero {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #0f172a 50%, #000000 100%);
  height: calc(100vh - var(--header-height, 80px));
  min-height: 500px; /* Ensure minimum height for content readability */
}

#hero::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(138, 43, 226, 0.1) 0%, transparent 50%);
  pointer-events: none;
  content: '';
}

#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Enhanced Text Effects */
.animate-glow {
  animation: glow 3s ease-in-out infinite;
}

/* Button Enhancements */
#hero-explore-btn,
#hero-video-btn {
  position: relative;
  overflow: hidden;
}

#hero-explore-btn::before {
  position: absolute;
  top: 0;
  left: -100%;
  transition: left 0.5s;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  width: 100%;
  height: 100%;
  content: '';
}

#hero-explore-btn:hover::before {
  left: 100%;
}

#hero-video-btn {
  animation: shimmer 3s ease-in-out infinite;
  background: linear-gradient(45deg, transparent 30%, rgba(245, 158, 11, 0.1) 50%, transparent 70%);
  background-size: 200% 200%;
}

/* Value Proposition Cards Enhanced */
.group:hover .text-electric-blue {
  text-shadow: 0 0 20px #3b82f6;
}

.group:hover .text-energy-gold {
  text-shadow: 0 0 20px #f59e0b;
}

.group:hover .text-plasma-purple {
  text-shadow: 0 0 20px #8a2be2;
}

/* Enhanced Scroll Indicator */
#scroll-indicator {
  animation: pulse-breathing 2s ease-in-out infinite;
}

#scroll-indicator:hover svg {
  filter: drop-shadow(0 0 10px currentColor);
}

/* Particle system styles */
.particle {
  position: absolute;
  animation: particle-float 8s ease-in-out infinite;
  border-radius: 50%;
  pointer-events: none;
}

.particle.ion-positive {
  box-shadow: 0 0 10px #ffd700;
  background: radial-gradient(circle, #ffd700, #ffa500);
}

.particle.ion-negative {
  box-shadow: 0 0 10px #00bfff;
  background: radial-gradient(circle, #00bfff, #0080ff);
}

.particle.plasma {
  box-shadow: 0 0 15px #8a2be2;
  background: radial-gradient(circle, #8a2be2, #ff1493);
}

/* Energy field effect */
.energy-field {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  animation: pulse-slow 6s ease-in-out infinite;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(0, 191, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 215, 0, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(138, 43, 226, 0.1) 0%,
      transparent 50%
    );
}

/* Scroll-triggered animations */
.fade-in-up {
  transform: translateY(30px);
  opacity: 0;
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.fade-in-up.active {
  transform: translateY(0);
  opacity: 1;
}

.fade-in-left {
  transform: translateX(-30px);
  opacity: 0;
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.fade-in-left.active {
  transform: translateX(0);
  opacity: 1;
}

.fade-in-right {
  transform: translateX(30px);
  opacity: 0;
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.fade-in-right.active {
  transform: translateX(0);
  opacity: 1;
}

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

::-webkit-scrollbar-track {
  background: rgba(11, 11, 47, 0.8);
}

::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: linear-gradient(to bottom, #00bfff, #8a2be2);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #ffd700, #00bfff);
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  animation: spin 1s ease-in-out infinite;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #00bfff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  margin: -1px;
  padding: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

.focus\:not-sr-only:focus {
  position: static;
  margin: 0;
  padding: 0.5rem 1rem;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .text-gray-300,
  .text-gray-400 {
    color: #ffffff;
  }

  .text-gray-200 {
    color: #ffffff;
  }

  .bg-white\/10,
  .bg-white\/20 {
    background-color: rgba(255, 255, 255, 0.3);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .particle {
    animation: none;
  }
}

/* Dark mode support (already dark by default, but prepared for light mode toggle) */
@media (prefers-color-scheme: light) {
  /* Light mode overrides can be added here if needed */
}

/* Print styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }

  .particle,
  #particle-container,
  .energy-field {
    display: none !important;
  }

  nav,
  footer {
    page-break-inside: avoid;
  }

  section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
  .particle {
    display: none; /* Reduce animations on mobile for performance */
  }

  html {
    font-size: 16px; /* Ensure readable font size on mobile */
  }

  /* Optimize hero section for mobile */
  #hero .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  #hero h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  /* Reduce particle count for mobile performance */
  #particles-canvas {
    opacity: 0.7;
  }

  /* Simplify value proposition cards on mobile */
  #hero .space-y-6 .grid {
    gap: 1rem;
  }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
  #hero h1 {
    font-size: 3.5rem;
  }

  #hero .grid {
    gap: 3rem;
  }
}

/* Desktop enhancements */
@media (min-width: 1025px) {
  #hero h1 {
    font-size: 4.5rem;
  }

  /* Enhanced particle effects for desktop */
  #particles-canvas {
    opacity: 1;
  }
}

/* Performance optimizations */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* Image optimization */
img {
  max-width: 100%;
  height: auto;
}

img[loading='lazy'] {
  transition: opacity 0.3s;
}

/* Focus indicators for better accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #00bfff;
  outline-offset: 2px;
}

/* Skip to content link styling */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  z-index: 1000;
  border-radius: 4px;
  background: #000;
  padding: 8px;
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 6px;
}

/* Error states */
.error-message {
  margin: 1rem 0;
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 0.5rem;
  background: rgba(255, 107, 107, 0.1);
  padding: 1rem;
  color: #ff6b6b;
}

/* Success states */
.success-message {
  margin: 1rem 0;
  border: 1px solid rgba(81, 207, 102, 0.3);
  border-radius: 0.5rem;
  background: rgba(81, 207, 102, 0.1);
  padding: 1rem;
  color: #51cf66;
}

/* Utility classes */
.text-shadow-glow {
  text-shadow: 0 0 10px currentColor;
}

.backdrop-blur-strong {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Experimental Evidence Section Styles */
#experimental-evidence {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #ffffff 100%);
}

/* Chart Container Styles */
.chart-container {
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  border: 1px solid rgba(226, 232, 240, 0.5);
  background: rgba(248, 250, 252, 0.8);
}

.chart-container:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  background: rgba(248, 250, 252, 0.95);
}

.chart-control-btn {
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  background: #e2e8f0;
  padding: 8px 16px;
  color: #475569;
  font-weight: 500;
}

.chart-control-btn:hover {
  transform: translateY(-1px);
  background: #cbd5e1;
}

.chart-control-btn.active {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  background: #2563eb;
  color: white;
}

/* Equipment Cards */
.equipment-card {
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.equipment-card::before {
  position: absolute;
  top: 0;
  left: -100%;
  transition: left 0.5s ease;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
  width: 100%;
  height: 100%;
  content: '';
}

.equipment-card:hover::before {
  left: 100%;
}

.equipment-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Flip Simulation Styles */
.battery-simulation {
  perspective: 1000px;
}

.battery-3d {
  transform-style: preserve-3d;
}

.battery-3d.flipped {
  transform: rotateX(180deg);
}

.battery-visual {
  transform-style: preserve-3d;
}

.voltage-indicator {
  transition: all 0.5s ease;
}

.battery-3d.flipped .voltage-indicator.top {
  transform: translateX(-50%) rotateX(180deg);
}

.battery-3d.flipped .voltage-indicator.bottom {
  transform: translateX(-50%) rotateX(180deg);
}

/* Ion Animation Styles */
.ion {
  position: absolute;
  animation: ionFlow 3s infinite linear;
  border-radius: 50%;
  width: 8px;
  height: 8px;
}

.ion.positive {
  left: 20%;
  animation-delay: 0s;
  background: #fbbf24;
}

.ion.negative {
  right: 20%;
  animation-delay: 1.5s;
  animation-direction: reverse;
  background: #3b82f6;
}

@keyframes ionFlow {
  0% {
    top: 10%;
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    top: 90%;
    opacity: 1;
  }
}

.battery-3d.flipped .ion.positive {
  animation-delay: 1.5s;
  animation-direction: reverse;
}

.battery-3d.flipped .ion.negative {
  animation-delay: 0s;
  animation-direction: normal;
}

/* Control Button Styles */
.control-btn {
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: none;
  font-weight: 600;
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.control-btn:active {
  transform: translateY(0);
}

/* Data Cards */
.data-card {
  transition: all 0.3s ease;
}

.data-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.data-card .value {
  transition: all 0.3s ease;
}

/* Control Items */
.control-item {
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.control-item::before {
  position: absolute;
  top: 0;
  left: -100%;
  transition: left 0.5s ease;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  width: 100%;
  height: 100%;
  content: '';
}

.control-item:hover::before {
  left: 100%;
}

.control-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Parameters Grid */
.parameters-grid .parameter {
  transition: all 0.3s ease;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  padding: 12px;
  text-align: center;
}

.parameters-grid .parameter:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.8);
}

/* Key Findings */
.key-findings {
  position: relative;
  overflow: hidden;
}

.key-findings::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.15) 100%);
  pointer-events: none;
  content: '';
}

/* Comparison Analysis */
.comparison-analysis {
  position: relative;
  overflow: hidden;
}

.comparison-analysis::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.05) 0%, rgba(138, 43, 226, 0.15) 100%);
  pointer-events: none;
  content: '';
}

.comparison-table table {
  position: relative;
  z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .chart-container {
    padding: 16px;
  }
  
  .chart-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .chart-control-btn {
    margin-bottom: 8px;
    width: 100%;
  }
  
  .simulation-controls {
    position: static;
    justify-content: center;
    transform: none;
    margin-top: 16px;
  }
  
  .real-time-data {
    grid-template-columns: 1fr;
  }
  
  .parameters-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .equipment-card {
    padding: 16px;
  }
  
  .battery-visual .battery-body {
    width: 24px;
    height: 36px;
  }
  
  .voltage-indicator {
    font-size: 14px;
  }
  
  .parameters-grid {
    grid-template-columns: 1fr;
  }
}

/* Smooth transitions for all interactive elements */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Remove smooth scrolling for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
