/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  color: #f8fafc;
  min-height: 100vh;
}

/* Hero Header */
.hero-header {
  position: relative;
  background: linear-gradient(135deg, #1e40af 0%, #7c3aed 50%, #db2777 100%);
  color: white;
  text-align: center;
  padding: 4rem 2rem;
  overflow: hidden;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #ffffff, #e2e8f0, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  font-size: 1.5rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.energy-pulse {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  margin: 0 auto;
  animation: energyPulse 2s infinite;
}

/* Sticky Navigation */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 600;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.chart-section {
  margin-bottom: 4rem;
  animation: fadeInUp 0.6s ease-out;
  scroll-margin-top: 100px;
}

.chart-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.chart-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}

.chart-header {
  padding: 2rem 2rem 1rem 2rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
}

.chart-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.chart-description {
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1.7;
}

.chart-container {
  padding: 2rem;
}

.chart {
  min-height: 500px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.3), rgba(51, 65, 85, 0.3));
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  position: relative;
  overflow: hidden;
}

.chart::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
  pointer-events: none;
}

/* Chart Placeholders */
.chart-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #94a3b8;
  position: relative;
  z-index: 2;
}

.placeholder-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.placeholder-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #e2e8f0;
}

.placeholder-subtitle {
  font-size: 1rem;
  opacity: 0.7;
}

/* SVG Styles */
svg {
  width: 100%;
  height: 500px;
  border-radius: 15px;
}

/* Axis title and label styles */
.axis-title,
.x-axis-title,
.y-axis-title,
svg .axis text,
svg text.axis-label,
svg text,
.axis text,
.x-axis text,
.y-axis text {
  fill: white !important;
  color: white !important;
}

/* Form Controls */
select {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.8);
  color: #f8fafc;
  font-size: 14px;
  margin-right: 10px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

label {
  font-size: 14px;
  margin-bottom: 5px;
  display: inline-block;
  color: #cbd5e1;
  font-weight: 500;
}

/* Slider Styles */
#yearSliderContainer {
  width: 100%;
  margin-top: 15px;
}

#yearSlider {
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #1e293b, #475569);
  outline: none;
  transition: all 0.3s ease;
}

#yearSlider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
}

#yearSlider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

#sliderLabel {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  margin-top: 10px;
  color: #e2e8f0;
  font-size: 1rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes energyPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.3;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-header {
    padding: 3rem 1rem;
  }

  .nav-container {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
  }

  .nav-links {
    justify-content: center;
  }

  .main-content {
    padding: 2rem 1rem;
  }

  .chart-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
  }

  .chart-container {
    padding: 1.5rem;
  }

  .chart-title {
    font-size: 1.5rem;
  }

  .nav-link {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .chart-header {
    padding: 1rem;
  }

  .chart-container {
    padding: 1rem;
  }

  .nav-links {
    gap: 0.25rem;
  }

  .nav-link {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }
}
