/* =============================================================================
   SDGQUEST-GALAXY.CSS - Styles for SDG QUEST GAME
   CASi Labs - Collaborative Intelligence Platform
   DECEMBER 2025
   ============================================================================= */


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

    body {
      font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
      background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #334155 100%);
      color: #2d2d2d;
      min-height: 100vh;
      overflow-x: hidden;
    }

    /* Header */
    .header {
      background: linear-gradient(135deg, #059669 0%, #10b981 100%);
      padding: 2rem;
      text-align: center;
      box-shadow: 0 4px 20px rgba(0,0,0,0.3);
      position: relative;
      z-index: 10;
    }

    .header h1 {
      font-size: 2.5rem;
      color: white;
      text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
      margin-bottom: 0.5rem;
    }

    .header p {
      font-size: 1.1rem;
      color: #d1fae5;
      font-weight: 600;
    }

    .header .tagline {
      font-size: 0.95rem;
      color: #a7f3d0;
      margin-top: 0.5rem;
      font-style: italic;
    }

    /* World Meters */
    .world-meters {
      background: rgba(255, 255, 255, 0.95);
      border-radius: 20px;
      padding: 1.5rem;
      margin: 2rem auto;
      max-width: 1200px;
      box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    }

    .meters-title {
      text-align: center;
      font-size: 1.3rem;
      font-weight: 700;
      color: #059669;
      margin-bottom: 1rem;
    }

    .meters-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.5rem;
    }

    .meter-container {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .meter-label {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-weight: 600;
      font-size: 1rem;
      color: #2d2d2d;
    }

    .meter-label .icon {
      font-size: 1.5rem;
    }

    .meter-bar {
      height: 30px;
      background: #e5e7eb;
      border-radius: 15px;
      overflow: hidden;
      position: relative;
      box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    }

    .meter-fill {
      height: 100%;
      transition: width 0.6s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      color: white;
      font-size: 0.9rem;
      text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    }

    .meter-fill.planet {
      background: linear-gradient(90deg, #10b981, #059669);
    }

    .meter-fill.equity {
      background: linear-gradient(90deg, #3b82f6, #2563eb);
    }

    .meter-fill.prosperity {
      background: linear-gradient(90deg, #f59e0b, #d97706);
    }

    .meter-fill.timeline {
      background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    }

    .meter-fill.critical {
      background: linear-gradient(90deg, #ef4444, #dc2626) !important;
      animation: pulse 1.5s ease-in-out infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.7; }
    }

    /* Galaxy Map Section */
    .map-section {
      max-width: 1400px;
      margin: 2rem auto;
      padding: 0 2rem;
    }

    .map-title {
      text-align: center;
      font-size: 1.8rem;
      color: white;
      margin-bottom: 1rem;
      text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    }

.map-subtitle {
  text-align: center;
  color: #94a3b8;
  font-size: 1.1rem;
  margin: -0.5rem 0 1rem 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

    #galaxyCanvas {
      width: 100%;
      height: 600px;
      border-radius: 12px;
      box-shadow: 0 8px 30px rgba(0,0,0,0.3);
      display: block;
    }

/* Mission Container */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.mission-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
}

/* Horizontal Mission Layout - Side by Side */
.mission-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 600px;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

/* Left Column - Mission Info */
/* Left Column - Mission Info */
.mission-info-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 450px;
  margin: 0 auto;
  width: 100%;
}

/* ============================================
   STEPPED PANEL FLOW - Address Challenge Button
   ============================================ */

.address-challenge-wrapper {
  margin-top: auto;
  padding-top: 1rem;
}

.btn-address-challenge {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-address-challenge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
}

.btn-address-challenge:active {
  transform: translateY(0);
}

.btn-address-challenge .btn-icon {
  font-size: 1.3rem;
}

.btn-address-challenge .btn-arrow {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.btn-address-challenge:hover .btn-arrow {
  transform: translateX(4px);
}

/* Back to Context Button */
.back-to-context {
  margin-bottom: 0.5rem;
}

.btn-back-context {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  color: #64748b;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back-context:hover {
  background: #f1f5f9;
  border-color: #3b82f6;
  color: #3b82f6;
}

/* Stepped Panel Transitions */
.mission-info-column,
.mission-choices-column {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mission-info-column.panel-hidden {
  display: none !important;
}

.mission-choices-column.panel-visible {
  display: flex !important;
}

/* Single column layout when in stepped mode */
.mission-card.stepped-mode {
  grid-template-columns: 1fr;
}

/* Single column layout when in stepped mode */
.mission-card.stepped-mode {
  grid-template-columns: 1fr;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mission-card.stepped-mode > * {
  max-width: 800px;
  width: 100%;
}

.mission-card.stepped-mode .mission-feedback-section {
  display: block;
}

.mission-card.stepped-mode .choice-options-single-row {
  grid-template-columns: repeat(2, 1fr);
}

.mission-card h2 {
  font-size: 1.4rem;
  color: #2563eb;
  margin-bottom: 0;
  text-align: left;
}

.mission-riddle {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.6;
  padding: 1rem;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-radius: 10px;
  border-left: 3px solid #3b82f6;
}


/* Mission Challenge - when in right column */
.mission-choices-column .mission-challenge {
  margin-bottom: 0.5rem;
}

.mission-choices-column .mission-riddle {
  margin-bottom: 0;
  border-radius: 10px 10px 0 0;
  border-bottom: none;
}

.mission-choices-column .choices-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #2563eb;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  border-radius: 0 0 10px 10px;
  border-left: 3px solid #3b82f6;
}


/* === NEW: Mission Context Elements === */

/* Official UN Target */
.official-target {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-left: 3px solid #f59e0b;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.official-target .target-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.official-target .target-text {
  font-size: 0.85rem;
  color: #78350f;
  line-height: 1.5;
  margin: 0;
}

/* Affected Population */
.affected-population {
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
  border-left: 3px solid #ec4899;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.affected-population .population-icon {
  font-size: 1.2rem;
}

.affected-population .population-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #9d174d;
  margin: 0;
}

/* Key Actors */
.key-actors {
  margin-bottom: 1rem;
}

.key-actors .actors-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.key-actors .actors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.key-actors .actor-badge {
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
}

/* Challenge Preview */
.challenge-preview {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  border-left: 3px solid #7c3aed;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.challenge-preview .challenge-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6d28d9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.challenge-preview .challenge-text {
  font-size: 0.95rem;
  color: #4c1d95;
  line-height: 1.5;
  margin: 0;
  font-style: italic;
}



/* Choice Tradeoffs */
.choice-tradeoff {
  font-size: 0.7rem;
  font-style: italic;
  color: #6b7280;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #e5e7eb;
}

/* === END NEW CSS === */


.agent-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0;
  justify-content: flex-start;
}

.agent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 20px;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Agent orb images */
.agent-avatar-img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  border-radius: 50%;
}

.consultation-avatar-img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  border-radius: 50%;
}

.agent-icon-img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  border-radius: 50%;
}

.agent:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.agent:active {
  transform: translateY(0);
}

/* Right Column - Choices HORIZONTAL */
.mission-choices-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.choice-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  flex: 1;
}

.choice-options-single-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  flex: 1;
}

.choice-btn {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 2px solid #3b82f6;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  color: #334155;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: auto;
}

.choice-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.choice-text {
  flex: 1;
  display: flex;
  align-items: center;
  text-align: center;
  line-height: 1.4;
  font-size: 0.85rem;
}

.choice-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
  border-color: #2563eb;
}

.choice-btn.selected {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border-color: #1d4ed8;
}

.choice-btn.selected .choice-letter {
  background: white;
  color: #3b82f6;
}

.choice-btn.selected .choice-text {
  color: white;
}

.choice-btn.selected .choice-tradeoff {
  color: rgba(255, 255, 255, 0.85);
  border-top-color: rgba(255, 255, 255, 0.3);
}

.choice-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  pointer-events: none;
}

.choice-btn:disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


/* Consult Guides Section */
.consult-guides-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 10px;
  border: 1px dashed #93c5fd;
}

.consult-guides-section .consult-prompt {
  font-size: 0.9rem;
  color: #1e40af;
  font-style: italic;
}

.consult-guides-section .btn-consult-inline {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.consult-guides-section .btn-consult-inline:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Direct Impacts Grid */
.direct-impacts-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.direct-impact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.direct-impact-item .impact-icon {
  font-size: 1.1rem;
}

.direct-impact-item .impact-name {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

.direct-impact-item .impact-value {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.direct-impact-item .impact-value.positive {
  color: #166534;
  background: #dcfce7;
}

.direct-impact-item .impact-value.negative {
  color: #991b1b;
  background: #fee2e2;
}

.direct-impact-item .impact-value.neutral {
  color: #475569;
  background: #f1f5f9;
}
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.preview-impact .impact-value.positive {
  color: #166534;
  background: #dcfce7;
}

.preview-impact .impact-value.negative {
  color: #991b1b;
  background: #fee2e2;
}

.preview-impact .impact-value.neutral {
  color: #475569;
  background: #f1f5f9;
}

.btn-confirm {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-confirm:active {
  transform: translateY(0);
}

/* Feedback and Actions - Spans Full Width */
.mission-feedback-section {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

/* Feedback */
.feedback {
  font-size: 1.1rem;
  padding: 1rem;
  border-radius: 12px;
  font-weight: 600;
}

.feedback.success {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
  border: 2px solid rgba(22, 163, 74, 0.3);
}

.feedback.error {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
  border: 2px solid rgba(220, 38, 38, 0.3);
}

/* Insight Box */
.insight-box {
  background: #eef2ff;
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  padding: 1.5rem;
  color: #312e81;
}

.insight-box strong {
  font-size: 1.1rem;
  color: #1e40af;
  display: block;
  margin-bottom: 0.5rem;
}

.insight-box p {
  line-height: 1.7;
  margin: 0;
}

/* Buttons */
.mission-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.btn-team {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-team:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: #e5e7eb;
  color: #334155;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #d1d5db;
}

.button-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Responsive - Stack on smaller screens */
@media (max-width: 1200px) {
  .mission-card {
    grid-template-columns: 1fr;
  }
  
  .choice-options {
    grid-template-columns: 1fr;
  }
  
  .choice-btn {
    min-height: 100px;
    flex-direction: row;
    text-align: left;
    justify-content: flex-start;
    padding: 1.5rem;
  }
  
  .choice-text {
    text-align: left;
  }
  
  .mission-feedback-section {
    grid-column: 1;
  }
}

    /* Footer */
    .footer {
      text-align: center;
      padding: 2rem;
      color: #94a3b8;
      font-size: 0.9rem;
    }

/* Meter Trend Chart */
.meter-trend-container {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.meter-trend-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.5rem;
}

#meterTrendChart {
  width: 100%;
  height: 120px;
  background: #f8fafc;
  border-radius: 8px;
}

.meter-trend-legend {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

/* Override time remaining to be more compact */
.time-remaining-compact {
  gap: 1rem !important;
  margin-top: 0.5rem !important;
}

.time-remaining-compact .time-value {
  font-size: 1.25rem !important;
}

.time-remaining-compact .time-label {
  font-size: 0.65rem !important;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.legend-item.planet::after {
  content: '';
  width: 16px;
  height: 3px;
  background: #22c55e;
  border-radius: 2px;
}

.legend-item.equity::after {
  content: '';
  width: 16px;
  height: 3px;
  background: #3b82f6;
  border-radius: 2px;
}

.legend-item.prosperity::after {
  content: '';
  width: 16px;
  height: 3px;
  background: #f59e0b;
  border-radius: 2px;
}

    /* Overlay */
     .overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.85);
      display: none;
      overflow-y: auto;
      padding: 2rem;
      justify-content: center;
      align-items: flex-start;
      z-index: 1000;
    }

    .overlay.active {
      display: flex;
    }

    .overlay-content {
      margin: auto;
      background: white;
      border-radius: 24px;
      padding: 3rem;
      max-width: 600px;
      width: 90%;
      box-shadow: 0 20px 60px rgba(0,0,0,0.4);
      text-align: center;
    }

    .overlay-content h2 {
      font-size: 2.5rem;
      color: #059669;
      margin-bottom: 1.5rem;
    }

    .overlay-content p {
      font-size: 1.1rem;
      color: #334155;
      line-height: 1.8;
      margin-bottom: 1rem;
    }

    @media (max-width: 768px) {
      .meters-grid {
        grid-template-columns: 1fr;
      }
      
      #galaxyCanvas {
        height: 400px;
      }
    }

/* Cascade Indicators on Galaxy Map */
.cascade-indicator {
  animation: pulse-cascade 2s ease-in-out infinite;
}

@keyframes pulse-cascade {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* Cascade Effects Section in Status Column */
.cascade-effects-section {
  transition: all 0.3s ease;
}

.cascade-effects-section:hover {
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
  transform: translateY(-2px);
}

/* Enhanced Feedback Text */
.feedback span[style*="color: #059669"] {
  font-weight: 600;
}

/* ============================================
   ENHANCED FLOATING TEAM BUTTON - NOW HIDDEN (integrated into workspace)
   ============================================ */
.floating-team-btn {
  display: none !important; /* Hidden - team button is now in mission-actions */
}

.floating-team-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.floating-team-btn:active {
  transform: translateY(0);
}

.floating-team-btn .team-btn-icon {
  font-size: 1.25rem;
}

.floating-team-btn .team-btn-label {
  font-weight: 600;
}

.floating-team-btn .team-badge {
  background: #fbbf24;
  color: #1e293b;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* Pulse animation when team is available */
.floating-team-btn.has-team {
  animation: teamPulse 2s ease-in-out infinite;
}

@keyframes teamPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 4px 25px rgba(59, 130, 246, 0.7); }
}

/* Tooltip on hover */
.floating-team-btn::before {
  content: 'Get expert advice before deciding';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 10px;
  background: #1e293b;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.floating-team-btn:hover::before {
  opacity: 1;
}

/* ============================================
   COLLAPSIBLE SECTIONS FOR FEEDBACK
   ============================================ */
.collapsible-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-top: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  cursor: pointer;
  background: #f1f5f9;
  transition: background 0.2s ease;
}

.collapsible-header:hover {
  background: #e2e8f0;
}

.collapsible-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: #334155;
  font-size: 0.95rem;
}

.collapsible-title .icon {
  font-size: 1.1rem;
}

.collapsible-badges {
  display: flex;
  gap: 0.5rem;
}

.cascade-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 600;
}

.cascade-badge.positive {
  background: #d1fae5;
  color: #065f46;
}

.cascade-badge.negative {
  background: #fee2e2;
  color: #991b1b;
}

.collapsible-chevron {
  color: #64748b;
  transition: transform 0.3s ease;
  font-size: 0.8rem;
}

.collapsible-section.expanded .collapsible-chevron {
  transform: rotate(180deg);
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.collapsible-section.expanded .collapsible-content {
  max-height: 500px;
  padding: 1rem;
}

/* Cascade Effects Content */
.cascade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Optional: Add a subtle scrollbar style */
.cascade-grid::-webkit-scrollbar {
  width: 6px;
}

.cascade-grid::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.cascade-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.cascade-grid::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.cascade-column h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cascade-column.positive h4 {
  color: #059669;
}

.cascade-column.negative h4 {
  color: #dc2626;
}

.cascade-item {
  padding: 0.5rem;
  background: white;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  border-left: 3px solid;
}

.cascade-item.positive {
  border-color: #10b981;
}

.cascade-item.negative {
  border-color: #ef4444;
}

.cascade-item-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1e293b;
}

.cascade-item-reason {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* ============================================
   TRADE-OFFS 
   ============================================ */


/* Trade-offs Collapsible */
.tradeoffs-collapsible {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.tradeoffs-collapsible .collapsible-header {
  background: #f1f5f9;
}

.tradeoffs-collapsible .collapsible-header:hover {
  background: #e2e8f0;
}

.tradeoffs-collapsible .collapsible-title {
  color: #334155;
}

/* Trade-offs Content */
/* Trade-offs Content */
.tradeoffs-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 350px;
  overflow-y: auto;
}

.tradeoff-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.875rem;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tradeoff-item.planet {
  border-left-color: #10b981;
}

.tradeoff-item.equity {
  border-left-color: #3b82f6;
}

.tradeoff-item.prosperity {
  border-left-color: #f59e0b;
}

.tradeoff-item.duration {
  border-left-color: #8b5cf6;
}

.tradeoff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tradeoff-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #374151;
}

.tradeoff-label .icon {
  font-size: 1.1rem;
}

.tradeoff-value {
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  min-width: 50px;
  text-align: center;
}

.tradeoff-value.positive {
  background: #d1fae5;
  color: #065f46;
}

.tradeoff-value.negative {
  background: #fee2e2;
  color: #991b1b;
}

.tradeoff-value.neutral {
  background: #f1f5f9;
  color: #64748b;
}

.tradeoff-explanation {
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.6;
  padding-left: 1.75rem;
}

/* Trade-off badge variants */
.tradeoff-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.tradeoff-badge.planet-wins {
  background: #d1fae5;
  color: #065f46;
}

.tradeoff-badge.equity-wins {
  background: #dbeafe;
  color: #1e40af;
}

.tradeoff-badge.prosperity-wins {
  background: #fef3c7;
  color: #92400e;
}

.tradeoff-badge.balanced {
  background: #f0fdf4;
  color: #166534;
}

.tradeoff-badge.mixed {
  background: #f1f5f9;
  color: #64748b;
}

/* Choice Trade-offs Perspectives */
.insight-perspectives {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.insight-perspective {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 8px;
  border-left: 3px solid #cbd5e1;
}

.insight-perspective:nth-child(1) {
  border-left-color: #10b981; /* Planet - green */
}

.insight-perspective:nth-child(2) {
  border-left-color: #3b82f6; /* Equity - blue */
}

.insight-perspective:nth-child(3) {
  border-left-color: #f59e0b; /* Prosperity - amber */
}

.perspective-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.perspective-label {
  font-weight: 600;
  color: #374151;
  min-width: 75px;
  flex-shrink: 0;
}

.perspective-text {
  flex: 1;
  color: #4b5563;
  line-height: 1.5;
  font-size: 0.9rem;
  min-width: 200px;
}

/* Trade-off badge variants */
.tradeoff-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.tradeoff-badge.planet-wins {
  background: #d1fae5;
  color: #065f46;
}

.tradeoff-badge.equity-wins {
  background: #dbeafe;
  color: #1e40af;
}

.tradeoff-badge.prosperity-wins {
  background: #fef3c7;
  color: #92400e;
}

.tradeoff-badge.mixed {
  background: #f1f5f9;
  color: #64748b;
}

/* ============================================
   FLOATING BUTTONS
   ============================================ */

.floating-reset-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #dc2626;
  color: white;
  border: none;
  font-size: 1.6rem;
  padding: 0.75rem 1rem;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-reset-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(220,38,38,0.4);
}

/* Team button */
.floating-team-btn {
  position: fixed;
  bottom: 70px;
  right: 25px;
  background: #3b82f6;
  color: white;
  border: none;
  font-size: 1.6rem;
  padding: 0.75rem 1rem;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-team-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.4);
}

/* NEW: Help button */
.floating-help-btn {
  position: fixed;
  bottom: 120px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #3b82f6;
  color: white;
  font-size: 1.8rem;
  display: flex;
  align-items: center;      /* vertically center */
  justify-content: center;  /* horizontally center */
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 9999;
  transition: transform 0.2s ease, background 0.2s ease;
}

.floating-help-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(16,185,129,0.4);
}

.team-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #fbbf24;
  color: black;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 12px;
}


/* ============================================
   INTRO MODAL STYLES
   ============================================ */

.intro-modal {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 700px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.intro-page {
  display: none;
}

.intro-page.active {
  display: block;
}

.intro-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.intro-header h2 {
  font-size: 2.5rem;
  color: #059669;
  margin-bottom: 0.5rem;
}

.intro-tagline {
  font-size: 1 rem;
  color: #64748b;
  font-style: italic;
}

.intro-body {
  margin-bottom: 2rem;
}

.intro-premise {
  font-size: 1.1rem;
  color: #334155;
  line-height: 1.7;
  text-align: center;
  margin-bottom: 1rem;
}

.intro-stakes {
  font-size: 1rem;
  color: #475569;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Agent Preview (Page 1) */
.intro-agents-preview {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.agent-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.agent-preview .agent-icon {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}

.agent-preview .agent-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1e293b;
}

.agent-preview .agent-domain {
  font-size: 0.85rem;
  color: #64748b;
}

/* Orb images for agents */
.agent-orb {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

.agent-card-orb {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

.meter-orb {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}

/* Color accents for agents */
.agent-preview.terra .agent-name,
.agent-card.terra .agent-card-name { color: #059669; }

.agent-preview.themis .agent-name,
.agent-card.themis .agent-card-name { color: #7c3aed; }

.agent-preview.oikos .agent-name,
.agent-card.oikos .agent-card-name { color: #d97706; }

/* Mechanics list */
.intro-mechanics {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.25rem;
}

.mechanic {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #475569;
}

.mechanic-icon {
  font-size: 1.25rem;
}

/* Agent Cards (Page 2) */
.intro-agents-full {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.agent-card {
  border-radius: 12px;
  padding: 1.25rem;
  border-left: 4px solid;
}

.agent-card.terra {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-left-color: #059669;
}

.agent-card.themis {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border-left-color: #7c3aed;
}

.agent-card.oikos {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-left-color: #d97706;
}

.agent-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.agent-card-icon {
  font-size: 1.75rem;
}

.agent-card-title {
  display: flex;
  flex-direction: column;
}

.agent-card-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.agent-card-subtitle {
  font-size: 0.85rem;
  color: #64748b;
}

.agent-card-quote {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #334155;
  font-style: italic;
  margin: 0;
}

/* Timeline */
.intro-timeline {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}

.timeline-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: #64748b;
}

.timeline-bar {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.timeline-progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #059669, #10b981);
  border-radius: 4px;
}

/* Challenge text */
.intro-challenge {
  text-align: center;
  font-size: 1rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Buttons */
.intro-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn-secondary {
  padding: 0.875rem 1.75rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f1f5f9;
  color: #475569;
  border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.intro-modal .btn-primary {
  padding: 0.875rem 1.75rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  border: none;
}

.intro-modal .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(5, 150, 105, 0.4);
}

/* Responsive */
@media (max-width: 600px) {
  .intro-modal {
    padding: 1.5rem;
  }
  
  .intro-header h2 {
    font-size: 2rem;
  }
  
  .intro-agents-preview {
    gap: 1rem;
  }
  
  .agent-preview .agent-icon {
    font-size: 2rem;
  }
  
  .intro-buttons {
    flex-direction: column;
  }
}

/* Status */

.status-message {
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 500;
  line-height: 1.4;
}

.status-message.neutral {
  background: #f3f4f6;
  color: #4b5563;
}

.status-message.good {
  background: #d1fae5;
  color: #065f46;
}

.status-message.warning {
  background: #fef3c7;
  color: #92400e;
}

.status-message.critical {
  background: #fee2e2;
  color: #991b1b;
  animation: pulse 2s infinite;
}

/* Progress */


.progress-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.progress-counter .progress-icon {
  font-size: 1rem;
}

.progress-counter .progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #5b21b6;
}

/* Intro Status Section - Light Theme */
.intro-status {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin: 1rem 0;
}

.intro-status-label {
  color: #0369a1;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.75rem;
}

.status-meters-intro {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.meter-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  min-width: 80px;
}

.meter-intro .meter-icon {
  font-size: 1.3rem;
}

.meter-intro .meter-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
}

.meter-intro .meter-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
}

.meter-intro .meter-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-top: 0.25rem;
}

.meter-intro.critical .meter-badge {
  background: #fee2e2;
  color: #dc2626;
}

.meter-intro.warning .meter-badge {
  background: #fef3c7;
  color: #d97706;
}

.meter-intro.ok .meter-badge {
  background: #dcfce7;
  color: #16a34a;
}

.intro-link {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 500;
}

.intro-link:hover {
  color: #1d4ed8;
}

.intro-challenge {
  text-align: center;
  font-size: 1.05rem;
  margin: 1rem 0;
  color: #334155;
}

.intro-challenge strong {
  color: #1e293b;
}

/* Priority Section */
.priority-section {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.priority-section h3 {
  margin: 0 0 0.5rem 0;
  color: #92400e;
  font-size: 1.1rem;
}

.priority-intro {
  font-size: 0.9rem;
  color: #78350f;
  margin-bottom: 1rem;
}

.priority-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.priority-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.priority-icon {
  font-size: 1.3rem;
}

.priority-details {
  display: flex;
  flex-direction: column;
}

.priority-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #1e293b;
}

.priority-why {
  font-size: 0.7rem;
  color: #64748b;
}

/* Steps Section */
.steps-section {
  margin-bottom: 1.5rem;
}

.steps-section h3 {
  margin: 0 0 0.75rem 0;
  color: #1e40af;
  font-size: 1.1rem;
}

.intro-closing {
  text-align: center;
  font-weight: 500;
  color: #334155;
  margin: 0;
}

/* Time up  */


.incomplete-sdg-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #fef2f2;
  border-radius: 6px;
  border-left: 3px solid #fca5a5;
}

.incomplete-sdg-item .sdg-icon {
  font-size: 1.2rem;
}

.incomplete-sdg-item .sdg-name {
  font-size: 0.85rem;
  color: #991b1b;
  font-weight: 500;
}

/* Inline Consult Button (in choices header) */
.btn-consult-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  margin-left: 0.75rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-consult-inline:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.choices-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Certificate Modal */
.certificate-modal-content {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.certificate-modal-content h3 {
  margin: 0 0 0.5rem 0;
  color: #1e293b;
  font-size: 1.5rem;
}

.certificate-modal-content p {
  color: #64748b;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.certificate-modal-content input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1.1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  text-align: center;
  transition: border-color 0.2s ease;
}

.certificate-modal-content input:focus {
  outline: none;
  border-color: #3b82f6;
}

.certificate-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
