/* Blood Chemistry Animation Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.animation-container {
  width: 100%;
  height: auto;
  position: relative;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.05) 0%, rgba(217, 70, 166, 0.05) 100%);
}

.background-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.background-layer.active {
  opacity: 0.3;
}

.graphs-container {
  position: relative;
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.graph-wrapper {
  width: 100%;
  height: 120px;
  margin: 0.5rem 0;
  padding-top: 2.5rem;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  position: relative;
}

.graph-label {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  color: #1f2937;
  text-align: left;
  padding: 0.5rem 0.75rem;
  width: auto;
  z-index: 10;
  background: rgba(255, 255, 255, 0.3);
}

.graph-svg {
  width: 100%;
  height: 100%;
}

.graph-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.breathing-line {
  stroke: #6b7280;
}

.cortisol-line {
  stroke: #d97706;
}

.sugar-line {
  stroke: #16a34a;
}

.fat-line {
  stroke: #6366f1;
}

.repair-line {
  stroke: #14b8a6;
}

.text-overlay {
  position: absolute;
  left: 35%;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 20;
  pointer-events: none;
}

.main-text {
  font-size: 2rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
  max-width: 90%;
  font-family: 'Georgia', serif;
}

.word {
  display: inline-block;
  opacity: 0;
  margin: 0 0.3rem;
}

.stage-indicator {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  height: 20px;
  display: none;
  justify-content: space-between;
  padding: 0 10px;
  box-sizing: border-box;
  z-index: 20;
}

.stage-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(107, 114, 128, 0.3);
  transition: all 0.3s ease;
  transform: translateY(-50%);
}

.stage-dot.active {
  background-color: #16a34a;
  transform: scale(1.3) translateY(-50%);
}

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #16a34a, #d946a6, #d97706);
  width: 0%;
  z-index: 30;
  display: none;
}

@media (max-width: 768px) {
  .animation-container {
    flex-direction: column;
  }

  .graphs-container {
    width: 100%;
    min-height: auto;
    padding: 1rem 0.5rem;
  }

  .graph-wrapper {
    height: 70px;
    margin: 0.4rem 0;
    padding-top: 2rem;
  }

   .graph-label {
      font-size: 0.65rem;
      padding: 0.4rem 0.5rem;
    }

   .text-overlay {
      position: relative;
      left: 0;
      right: 0;
      top: auto;
      bottom: auto;
      padding: 1rem;
      transform: none;
    }

  .main-text {
    font-size: 1.25rem;
    max-width: 90%;
  }

  .word {
    margin: 0 0.2rem;
  }
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.6);
  pointer-events: none;
  opacity: 0;
}

.wave-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 251, 240, 0.3) 100%);
  pointer-events: none;
}

.background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  z-index: 5;
  pointer-events: none;
}

/* Image 0: chaos/dysregulated - "We need to calm our blood chemistry down" */
.background-image#img-chaos {
  background-image: url('../media/PSX_20210207_162104.jpg');
  background-position: center;
}

/* Image 1: yoga/breathwork - "Yoga, breathwork, lengthening the exhale" */
.background-image#img-breath {
  background-image: url('../media/yoga-cobra.png');
  background-position: center 20%;
}

/* Image 3: zoom out 30% (70% of original size), show more of top */
.background-image#img-fire {
  background-image: url('../media/biking-guys.jpg');
  background-size: 70%;
  background-position: center 10%;
  background-repeat: no-repeat;
  background-color: #d1d5db;
}

/* Image 4: swimming/water/earth - "Swimming in water, hands in soil, green herbs growing" */
.background-image#img-water-earth {
  background-image: url('../media/PSX_20200822_152439.jpg');
  background-position: center;
}
