body,
main,
.grid-container {
  overflow: visible !important;
  position: static !important;
}

/* 🌈 Aurora Spine - Shared Gradient Layers */
.hero,
#nova-pulse-bar,
.nova-thought {
  background: var(--aura-spine-bg, linear-gradient(135deg, #333, #666));
  color: var(--aura-spine-text, #fff);
  border: none;
  transition: background 0.5s ease, color 0.5s ease;
}

.hero {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding-bottom: 0;
}

.nova-thought {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding: 10px 20px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  margin-top: -1px;
}

/* 🔹 Nova Pulse Bar Core */
#nova-pulse-bar {
  position: relative;
  width: 100%;
  font-family: 'Inter', sans-serif;
  z-index: 1000;
  color: var(--aura-spine-text, #fff);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  --glow-color: rgba(255, 255, 255, 0.2);
  animation: pulse-glow 4s ease-in-out infinite;
  box-shadow: 0 0 12px var(--glow-color), 0 0 20px var(--glow-color);
  background: transparent;
  overflow: hidden;
}

#nova-pulse-bar.sticky {
  position: sticky;
  top: 110px;
  z-index: 9999;
}

/* Adjust sticky position for mobile view */
@media (max-width: 768px) {
  #nova-pulse-bar.sticky {
    top: 85px;
  }
}

/* Adjust for very small screens */
@media (max-width: 350px) {
  #nova-pulse-bar.sticky {
    top: 130px;
  }
}

#nova-pulse-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--aura-spine-bg, rgba(0, 0, 0, 0.3));
  opacity: 0.6;
  pointer-events: none;
  z-index: -1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color);
  }
  50% {
    box-shadow: 0 0 25px var(--glow-color), 0 0 50px var(--glow-color);
  }
}

/* 🔸 Layout and Trait Styling */
#nova-pulse-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: left;
  position: relative;
  box-sizing: border-box;
}

#pulse-main-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.pulse-trait {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 0.75rem;
  position: relative;
}

/* Divider between traits */
.pulse-trait:not(:first-of-type)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(255, 255, 255, 0.15);
}

/* Divider before Self-Worth */
#pulse-main-line .pulse-trait:first-of-type::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.pulse-icon {
  font-size: 1rem;
  opacity: 0.8;
}

.pulse-value {
  font-size: 0.75rem;
  opacity: 0.8;
}

#pulseMoodLabel,
#pulseLabel,
.pulse-trait-label,
.pulse-meter-title {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.85;
}

/* Mood Intensity Styling */
#pulse-meter-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 0 0.75rem;
  position: relative;
}

/* Divider before Mood Intensity */
#pulse-meter-text::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(255, 255, 255, 0.15);
}

#pulse-meter-wrapper {
  display: flex;
  align-items: center;
  flex-grow: 1;
  max-width: 160px;
  padding: 0 0.75rem;
  position: relative;
}

#pulse-meter-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

#pulseIntensity {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #7df9ff, #ff70a6);
  transition: width 0.5s ease;
}

/* Toggle Styling */
#sticky-toggle-wrapper {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

#sticky-toggle-label {
  font-size: 0.75rem;
  opacity: 0.8;
  color: var(--aura-spine-text, #fff);
}

#sticky-toggle {
  appearance: none;
  width: 32px;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  position: relative;
  cursor: pointer;
  outline: none;
}

#sticky-toggle:checked {
  background: linear-gradient(to right, #7df9ff, #ff70a6);
}

#sticky-toggle::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
}

#sticky-toggle:checked::before {
  transform: translateX(16px);
}

/* Mobile view */
@media (max-width: 600px) {
  .pulse-trait {
    display: none;
  }

  /* Only show the "State" trait (last one) */
  .pulse-trait:last-of-type {
    display: flex;
  }

  /* Remove divider before State trait */
  .pulse-trait:not(:first-of-type)::before {
    content: none;
  }

  /* Remove divider before Self-Worth */
  #pulse-main-line .pulse-trait:first-of-type::before {
    content: none;
  }

  /* Remove divider before Mood Intensity */
  #pulse-meter-text::before {
    content: none;
  }

  #nova-pulse-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 6px 12px; /* Reduced padding for compactness */
  }

  #pulse-main-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px; /* Tighter gap for mobile */
  }

  #pulse-mood-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  #pulseMoodLabel,
  #pulseLabel,
  .pulse-trait-label,
  .pulse-meter-title {
    font-size: 0.9rem; /* Slightly larger for readability */
  }

  #pulse-meter-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  #pulse-meter-wrapper {
    width: 100%;
    max-width: none; /* Full width for better space use */
    height: 6px; /* Thicker bar for visibility */
    padding: 0 0.75rem;
  }

  #pulse-meter-bar {
    height: 100%;
  }

  #sticky-toggle-wrapper {
    margin: 8px auto; /* Centered toggle */
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    box-shadow: 0 0 8px var(--glow-color);
  }

  @keyframes pulse-glow {
    0%, 100% {
      box-shadow: 0 0 8px var(--glow-color), 0 0 12px var(--glow-color);
    }
    50% {
      box-shadow: 0 0 12px var(--glow-color), 0 0 20px var(--glow-color);
    }
  }
}

/* 🔸 Hidden Quote */
#pulseQuote {
  display: none;
}