/* Base Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

.font-geist-mono {
  font-family: 'Geist Mono', monospace;
}

/* Risk Meter */
.risk-meter-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 1rem;
}

.risk-meter {
  width: 200px;
  height: 100px;
  background: linear-gradient(to right, #4ade80, #facc15, #f87171);
  border-radius: 100px 100px 0 0;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.1);
}

.risk-needle {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
  transform-origin: bottom center;
  width: 4px;
  height: 90px;
  background-color: #1f2937;
  border-radius: 4px;
  transition: transform 1.5s ease-in-out;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.risk-labels {
  display: flex;
  justify-content: space-between;
  width: 200px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
}

/* Step Items */
.step-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #f3f4f6;
}

.step-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  margin-right: 16px;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

/* Chapter Navigation */
#chapter-nav {
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  border-left: 1px solid #e5e7eb;
}

#chapter-nav.active {
  transform: translateX(0);
}

#chapter-list a {
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
}

#chapter-list a:hover {
  background-color: #f3f4f6;
  transform: translateX(4px);
}

#overlay.active {
  display: block;
}

/* Animations */
@keyframes oscillateNeedle {
  0% { transform: translateX(-50%) rotate(-45deg); }
  25% { transform: translateX(-50%) rotate(5deg); }
  50% { transform: translateX(-50%) rotate(45deg); }
  75% { transform: translateX(-50%) rotate(20deg); }
  100% { transform: translateX(-50%) rotate(-45deg); }
}

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

section {
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .step-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .step-number {
    margin-bottom: 12px;
  }
  
  #chapter-nav {
    width: 85%;
  }
}
