/* === Global Page Setup === */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Orbitron', 'Roboto', sans-serif;
  background: transparent;
  min-height: 100vh;
  height: auto;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* === Galactic Canvas === */
#galactic-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  height: 100%;
  z-index: 0;
  background: #000;
}

/* === Chart Container Layout === */
.realtime-charts-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
  padding: 3rem 1rem 6rem 1rem;
}

/* === Section Card Styling === */
.solar-wind-section,
.proton-flux-section,
.k-index-section,
.xray-flux-section {
  background: rgba(15, 15, 25, 0.45);
  border: 1px solid rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 2rem 2.5rem;
  max-width: 900px;
  max-height: 500px;
  width: 95%;
  /* transition: transform 0.3s ease, box-shadow 0.3s ease; */
}

.solar-wind-section:hover,
.proton-flux-section:hover,
.k-index-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.15);
}

/* === Section Titles === */
h2 {
  text-align: center;
  font-size: 1.8rem;
  color: #00eaff;
  letter-spacing: 1.5px;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  /* margin-bottom: 1rem; */
}

/* === Descriptive Text === */
.sw-text, .pf-text, .xray-text, .k-index-text {
  text-align: center;
  color: #ccc;
  font-size: 0.95rem;
  max-width: 700px;
  margin: 0 auto 1rem auto;
  line-height: 1.6;
}

/* === Chart Canvas Styling === */
canvas {
  width: 100%;
  max-height: 400px;
  background: transparent;
}

/* === Time Range Buttons === */
.time-range-buttons,
.energy-range-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0 2rem 0;
}

.time-range-buttons button,
.energy-range-buttons button {
  background: rgba(0, 234, 255, 0.1);
  border: 1px solid rgba(0, 234, 255, 0.4);
  color: #00eaff;
  padding: 0.6rem 1.3rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}

.time-range-buttons button:hover,
.energy-range-buttons button:hover {
  background: rgba(0, 234, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.6);
}

.active-button {
  background: rgba(0, 234, 255, 0.3);
  border-color: #00eaff;
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.6);
}

/* === Legend Section === */
#legend-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #fff;
}

.legend-line {
  width: 25px;
  height: 3px;
  border-radius: 2px;
}

.bz-line { background: linear-gradient(90deg, #ff6600, #ff0000); }
.bt-line { background: linear-gradient(90deg, #00eaff, #0080ff); }

/* === Footer and Data Source === */
.data-source, .xray-data-source, .k-index-data-source {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 1rem;
}

.data-source a, .xray-data-source a, .k-index-data-source a {
  color: #00eaff;
  text-decoration: none;
}

.data-source a:hover {
  text-decoration: underline;
}

/* === Responsive === */
@media (max-width: 768px) {
  .solar-wind-section,
  .proton-flux-section,
  .k-index-section {
    padding: 1.5rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .time-range-buttons button,
  .energy-range-buttons button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}
