/*
 * Challenge Component Styles
 * 
 * Reusable UI components for challenge pages.
 * These styles are shared across all daily challenges.
 * For day-specific customizations, add inline styles or custom classes.
 */

/* ===========================
   CHALLENGE WORKSPACE
   =========================== */

.challenge-workspace {
  margin-bottom: 30px;
}

/* ===========================
   INTERACTIVE WORKSPACE (Canvas challenges)
   =========================== */

.interactive-workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.interactive-workspace .map-container {
  width: 100%;
}

.interactive-workspace .route-builder {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}

@media (max-width: 968px) {
  .interactive-workspace .route-builder {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   MAP CONTAINER (Canvas challenges)
   =========================== */

.map-container {
  background: var(--color-white);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-gray);
  position: relative;
  box-shadow: var(--shadow-md);
}

.map-container h3 {
  margin-bottom: 15px;
  color: var(--color-dark);
  font-weight: 700;
  font-size: 1.3em;
}

.map-canvas {
  width: 100%;
  height: 500px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-gray-light);
  position: relative;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
  cursor: default;
  display: block;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.map-canvas:hover {
  background: var(--color-gray);
}

.day01-map-canvas {
  height: 570px;
}

/* ===========================
   ROUTE BUILDER (Canvas challenges)
   =========================== */

.route-builder {
  background: var(--color-white);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-gray);
  box-shadow: var(--shadow-md);
}

.route-panels {
  grid-column: 1 / -1;
  display: grid;
  gap: 20px;
  align-items: flex-start;
}

.route-panels--split {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.route-builder h3 {
  margin-bottom: 15px;
  color: var(--color-dark);
  font-weight: 700;
  font-size: 1.3em;
}

.route-progress {
  background: var(--color-gray-light);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  border: 2px solid var(--color-gray);
}

.route-progress h4 {
  color: var(--color-secondary);
  font-size: 1em;
  margin-bottom: 12px;
  font-weight: 600;
}

.route-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 50px;
  align-items: center;
}

.route-point-badge {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1em;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.route-point-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--color-primary-dark);
}

.route-point-badge .remove-btn {
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  transition: background var(--transition-fast);
}

.route-point-badge .remove-btn:hover {
  background: rgba(255,255,255,0.5);
}

.route-instructions {
  background: var(--color-white);
  border: 2px solid var(--color-gray);
  border-top: 4px solid var(--color-secondary);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 20px;
  color: var(--color-dark);
  box-shadow: var(--shadow-sm);
}

.route-instructions h4 {
  margin: 0 0 10px 0;
  font-size: 1em;
  font-weight: 700;
  color: var(--color-secondary);
}

.route-instructions ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}

.route-instructions li {
  margin-bottom: 5px;
}

/* ===========================
   ROUTE ARENAS LIST (Day 1 intro)
   =========================== */

.route-arenas-list {
  counter-reset: route-arena;
  list-style: none;
  margin: 18px 0 28px;
  padding: 0;
}

.route-arenas-list li {
  counter-increment: route-arena;
  position: relative;
  padding: 10px 18px 10px 64px;
}

.route-arenas-list li::before {
  content: counter(route-arena) '.';
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 1.15em;
  color: var(--color-secondary);
}

.route-arenas-list strong {
  color: var(--color-dark);
}

/* ===========================
   CHALLENGE FEEDBACK CARD
   =========================== */

.challenge-feedback-card {
  margin-top: 30px;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(6, 66, 38, 0.15);
  background: linear-gradient(135deg, rgba(244, 240, 187, 0.35), rgba(255, 255, 255, 0.9));
  box-shadow: 0 12px 30px rgba(6, 66, 38, 0.08);
}

.challenge-feedback-card.is-hidden {
  display: none;
}

.feedback-card-header h3 {
  margin-bottom: 8px;
  color: var(--color-secondary);
}

.feedback-card-header p {
  color: var(--color-text-light);
  margin-bottom: 18px;
}

.feedback-like-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.feedback-like-btn {
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 22px;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.feedback-like-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--color-primary-dark);
}

.feedback-like-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.feedback-like-btn.is-liked {
  background: var(--color-secondary);
}

.feedback-like-count {
  font-size: 0.95em;
  color: var(--color-text-light);
}

.feedback-label {
  font-weight: 600;
  color: var(--color-text);
  display: block;
  margin-bottom: 8px;
}

.feedback-textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray);
  padding: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 110px;
  background: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.feedback-textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(6, 66, 38, 0.15);
}

.feedback-submit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.feedback-submit-btn {
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 28px;
  background: var(--color-secondary);
  color: var(--color-white);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.feedback-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--color-secondary-dark);
}

.feedback-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.feedback-status {
  font-size: 0.9em;
  color: var(--color-text-light);
  min-height: 1em;
}

.feedback-status--success {
  color: #15803d;
}

.feedback-status--error {
  color: #b91c1c;
}

.feedback-status--info {
  color: var(--color-text-light);
}

/* ===========================
   STATS PANEL
   =========================== */

.stats-panel {
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 25px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  align-items: center;
}

.stat-row .stat-label {
  font-size: 1em;
  opacity: 0.95;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--color-white);
}

.stat-row .stat-value {
  font-size: 1.6em;
  font-weight: 700;
  color: var(--color-white);
}

.stat-value.large {
  font-size: 2.5em;
  background: rgba(255,255,255,0.2);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
}

.map-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.map-selector-btn {
  flex: 1 1 230px;
  border: 2px solid var(--color-gray);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.map-selector-btn .map-selector-title {
  font-weight: 700;
  color: var(--color-dark);
  display: block;
}

.map-selector-btn .map-selector-meta {
  font-size: 0.85em;
  color: var(--color-secondary);
  opacity: 0.8;
}

.map-selector-btn.active {
  border-color: var(--color-primary);
  box-shadow: 0 5px 15px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.map-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 15px 0;
}

.map-score-card {
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.2);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.map-score-card.complete {
  border-color: #4ade80;
  box-shadow: 0 0 15px rgba(74,222,128,0.4);
  transform: translateY(-3px);
}

.map-score-title {
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin-bottom: 6px;
}

.map-score-metric {
  font-size: 1.3em;
  font-weight: 700;
}

.map-score-subtext {
  font-size: 0.95em;
  opacity: 0.85;
}

/* ===========================
   CHALLENGE ACTION BAR
   =========================== */

.challenge-actions {
  grid-column: 1 / -1;
  margin-top: 25px;
  padding: 24px 28px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(67, 41, 31, 0.08);
  box-shadow: 0 20px 50px rgba(6, 66, 38, 0.08);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 20px;
}

.challenge-actions__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.challenge-action-btn {
  flex: 1 1 180px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(6, 66, 38, 0.2);
  background: rgba(6, 66, 38, 0.05);
  color: var(--color-secondary);
  font-weight: 600;
  font-size: 0.95em;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.challenge-action-btn:hover {
  background: rgba(6, 66, 38, 0.12);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.challenge-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.2em;
  font-weight: 700;
  color: var(--color-white);
  background: var(--color-primary);
  box-shadow: 0 18px 35px rgba(6, 66, 38, 0.25);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.challenge-submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 45px rgba(6, 66, 38, 0.3);
}

.challenge-submit-btn:active {
  transform: translateY(-1px);
}

.challenge-actions--single {
  grid-template-columns: 1fr;
}

.challenge-actions--single .challenge-submit-btn {
  max-width: 520px;
  justify-self: center;
}

@media (max-width: 900px) {
  .challenge-actions {
    grid-template-columns: 1fr;
  }
  
  .challenge-submit-btn {
    width: 100%;
  }
}

/* ===========================
   HINT BOX
   =========================== */

.hint-box {
  background: var(--color-white);
  border: 2px solid var(--color-gray);
  border-top: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 15px;
  display: none;
  box-shadow: var(--shadow-sm);
}

.hint-box.visible {
  display: block;
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   PROGRESS BAR
   =========================== */

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ===========================
   PLASTIC STREAM CHALLENGE
   =========================== */

.plastic-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.legend-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 1em;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: var(--color-background);
  box-shadow: var(--shadow-sm);
}

.legend-pill[data-action="refuse"] {
  background: #ffe3ec;
  color: #ef476f;
}

.legend-pill[data-action="reuse"] {
  background: #fff4d4;
  color: #d08700;
}

.legend-pill[data-action="recycle"] {
  background: #d9fff1;
  color: #058060;
}

.legend-pill[data-action="landfill"] {
  background: #edf2f7;
  color: #e7bc65;
}

.action-glossary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.glossary-item {
  background: var(--color-background);
  border: 1px solid var(--color-gray);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 1em;
  line-height: 1.4;
}

.glossary-item p {
  margin: 6px 0 0 0;
}

.glossary-item.last-resort {
  border-color: #f4a261;
  background: #fff7ec;
}

.intervention-list-wrapper {
  background: var(--color-white);
  border: 2px solid var(--color-gray);
  border-radius: var(--radius-md);
  padding: 25px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
}

.intervention-list {
  margin-top: 20px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.intervention-card {
  background: var(--color-background);
  border: 1px solid var(--color-gray);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.intervention-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.intervention-card.highlight {
  animation: pulseCard 1.2s ease;
}

@keyframes pulseCard {
  0% {
    box-shadow: 0 0 0 0 rgba(6, 214, 160, 0.5);
  }
  100% {
    box-shadow: 0 0 0 16px rgba(6, 214, 160, 0);
  }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-title {
  font-weight: 700;
  color: var(--color-dark);
}

.card-impact {
  font-size: 1em;
  font-weight: 600;
  color: var(--color-secondary);
}

.card-fact {
  font-size: 1em;
  color: #596a7c;
  margin-bottom: 10px;
}

.selected-action {
  font-size: 1em;
  font-weight: 600;
  margin-bottom: 12px;
}

.action-pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-pill {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 1em;
  color: #3a4a5e;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.action-pill.active {
  background: var(--pill-color, var(--color-accent));
  color: #efe273;
  box-shadow: var(--shadow-md);
}

.action-pill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-style: dashed;
  box-shadow: none;
}

.selected-action .landfill-note {
  display: block;
  font-size: 1em;
  color: #e7796c;
  margin-top: 4px;
}

.btn-card-action {
  width: 100%;
  padding: 10px 16px;
  background: var(--color-accent);
  color: var(--color-dark);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 10px;
}

.btn-card-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.intervention-card.assigned {
  border-color: var(--color-accent);
  background: #fffef8;
}

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

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.visible {
  opacity: 1;
}

.modal-content {
  background: var(--color-white);
  border-radius: var(--radius-md);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 2px solid var(--color-gray);
}

.modal-header h3 {
  margin: 0;
  color: var(--color-dark);
  font-size: 1.4em;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2em;
  color: #999;
  cursor: pointer;
  line-height: 0.8;
  padding: 0;
  width: 32px;
  height: 32px;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-dark);
}

.modal-section {
  padding: 20px 25px;
  border-bottom: 1px solid var(--color-gray-light);
}

.modal-section:last-child {
  border-bottom: none;
}

.modal-section h4 {
  margin: 0 0 15px 0;
  color: var(--color-secondary);
  font-size: 1.1em;
}

.modal-question {
  font-size: 1.1em;
  color: var(--color-dark);
  margin-bottom: 15px;
  font-weight: 600;
}

.habit-options {
  display: grid;
  gap: 10px;
}

.habit-option-btn {
  padding: 12px 16px;
  background: var(--color-background);
  border: 2px solid var(--color-gray);
  border-radius: var(--radius-md);
  font-size: 1em;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.habit-option-btn:hover {
  border-color: var(--color-accent);
  background: #fffef8;
}

.habit-option-btn.selected {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 600;
}

.modal-fact-section {
  background: var(--color-background);
}

.modal-fact-section p {
  margin: 8px 0;
  line-height: 1.6;
}

.modal-source {
  font-size: 0.95em;
  color: #596a7c;
}

.modal-source a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

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

.modal-impact {
  color: var(--color-secondary);
  font-weight: 600;
}

.modal-actions-section {
  display: none;
}

.action-instruction {
  font-size: 0.95em;
  color: #596a7c;
  margin-bottom: 15px;
  line-height: 1.5;
}

.modal-action-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.modal-action-pill {
  padding: 14px;
  background: var(--pill-bg, var(--color-background));
  border: 2px solid var(--pill-color, var(--color-gray));
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  position: relative;
}

.modal-action-pill:hover:not(.disabled) {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-width: 3px;
}

.modal-action-pill.selected {
  background: var(--pill-color, var(--color-accent));
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.modal-action-pill.selected .action-description,
.modal-action-pill.selected .action-metrics {
  color: white;
}

.modal-action-pill.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5;
}

.modal-action-pill .action-pill-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.modal-action-pill .action-icon {
  font-size: 1.5em;
}

.modal-action-pill .action-label {
  font-weight: 700;
  font-size: 1em;
}

.modal-action-pill .action-description {
  font-size: 0.85em;
  color: #596a7c;
  margin-bottom: 8px;
  line-height: 1.3;
}

.modal-action-pill .action-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8em;
  color: #596a7c;
  margin-top: 8px;
}

.modal-action-pill .metric {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  background: rgba(0,0,0,0.05);
  padding: 3px 8px;
  border-radius: 4px;
}

.modal-action-pill.selected .metric {
  background: rgba(255,255,255,0.2);
  color: white;
}

.modal-action-pill .action-constraint {
  font-size: 0.8em;
  color: #d9534f;
  margin-top: 6px;
  font-style: italic;
}

@media (max-width: 600px) {
  .modal-action-pills {
    grid-template-columns: 1fr;
  }
}

/* Additional mobile breakpoint for very small screens */
@media (max-width: 480px) {
  .map-container,
  .route-builder,
  .stats-panel,
  .challenge-content,
  .challenge-description {
    padding: 12px;
  }
  
  .map-container h3,
  .route-builder h3 {
    font-size: 1em;
    margin-bottom: 8px;
  }
  
  .map-canvas {
    height: 300px;
  }
  
  .challenge-action-btn {
    padding: 10px 14px;
    font-size: 0.85em;
  }
  
  .challenge-submit-btn {
    font-size: 1em;
    padding: 14px;
  }
  
  .challenge-feedback-card {
    padding: 16px;
  }

  .feedback-like-row,
  .feedback-submit-row {
    flex-direction: column;
    gap: 8px;
  }

  .feedback-like-btn,
  .feedback-submit-btn {
    width: 100%;
  }

  .feedback-like-count,
  .feedback-status {
    font-size: 0.85em;
  }
  
  .quiz-card {
    padding: 20px;
  }
  
  .quiz-card-number {
    padding: 5px 12px;
    font-size: 0.8em;
    margin-bottom: 12px;
  }
  
  .quiz-card-question {
    font-size: 1.1em;
    margin-bottom: 15px;
  }
  
  .quiz-card-options {
    gap: 10px;
  }
  
  .quiz-card-option {
    padding: 12px 15px;
    font-size: 0.95em;
  }
  
  .quiz-card-explanation {
    padding: 12px;
    font-size: 0.9em;
  }
  
  .quiz-question-container {
    min-height: 300px;
  }
  
  .quiz-complete-card {
    padding: 30px 20px;
  }
  
  .quiz-complete-emoji {
    font-size: 3em;
    margin-bottom: 15px;
  }
  
  .quiz-complete-title {
    font-size: 1.5em;
    margin-bottom: 20px;
  }
  
  .quiz-complete-score {
    padding: 20px;
  }
  
  .quiz-complete-score-value {
    font-size: 2em;
  }
  
  .intervention-card {
    padding: 12px;
  }
  
  .modal-content {
    padding: 0;
  }
  
  .modal-header {
    padding: 15px 18px;
  }
  
  .modal-header h3 {
    font-size: 1.2em;
  }
  
  .modal-section {
    padding: 15px 18px;
  }
  
  .modal-question {
    font-size: 1em;
  }
  
  .challenge-header {
    padding: 15px;
  }
  
  .challenge-header h2 {
    font-size: 1.4em;
  }
}

/* ===========================
   CELEBRATION BANNER
   =========================== */

.celebration {
  display: none;
  text-align: center;
  padding: 25px;
  background: var(--color-accent);
  color: var(--color-dark);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  animation: celebrate 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
}

.celebration.visible {
  display: block;
}

@keyframes celebrate {
  0% { 
    transform: scale(0.8) rotate(-5deg); 
    opacity: 0;
  }
  50% { 
    transform: scale(1.1) rotate(2deg); 
  }
  100% { 
    transform: scale(1) rotate(0deg); 
    opacity: 1;
  }
}

/* ===========================
   CHALLENGE CONTENT (Form challenges)
   =========================== */

.challenge-content {
  background: var(--color-white);
  padding: 30px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-gray);
  margin-bottom: 30px;
}

/* ===========================
   QUIZ CHALLENGE COMPONENTS
   =========================== */

#quiz-container {
  max-width: 800px;
  margin: 0 auto;
}

/* Progress Bar */
.quiz-progress-container {
  margin-bottom: 30px;
}

.quiz-progress-text {
  text-align: center;
  font-size: 1.1em;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 10px;
}

.quiz-progress-bar {
  width: 100%;
  height: 12px;
  background: var(--color-gray-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-secondary) 0%, var(--color-accent) 100%);
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Score Header */
.quiz-score-header {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  padding: 20px;
  background: var(--color-background);
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.quiz-score-label {
  font-size: 1.1em;
  font-weight: 500;
  color: var(--color-dark);
  opacity: 0.8;
}

.quiz-score-value {
  font-size: 3em;
  font-weight: 700;
  color: var(--color-secondary);
  transition: transform 0.3s ease;
}

.quiz-score-value.score-pulse {
  animation: scorePulse 0.6s ease;
}

@keyframes scorePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); color: var(--color-accent); }
  100% { transform: scale(1); }
}

.quiz-score-max {
  font-size: 1.5em;
  font-weight: 600;
  color: var(--color-gray-dark);
}

/* Question Container */
.quiz-question-container {
  min-height: 400px;
  position: relative;
}

/* Question Card */
.quiz-card {
  background: var(--color-white);
  border: 3px solid var(--color-gray);
  border-radius: var(--radius-md);
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.quiz-card.exit {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
}

.quiz-card.flash-correct {
  animation: flashCorrect 0.8s ease;
}

.quiz-card.flash-incorrect {
  animation: flashIncorrect 0.8s ease;
}

.quiz-card.flash-close {
  animation: flashClose 0.8s ease;
}

@keyframes flashCorrect {
  0% { border-color: var(--color-gray); }
  15% { border-color: var(--color-secondary); box-shadow: 0 0 30px rgba(34, 111, 84, 0.5); transform: scale(1.02); }
  30% { border-color: var(--color-accent); }
  100% { border-color: var(--color-gray); box-shadow: var(--shadow-lg); transform: scale(1); }
}

@keyframes flashIncorrect {
  0% { border-color: var(--color-gray); }
  10% { border-color: var(--color-primary); box-shadow: 0 0 30px rgba(218, 44, 56, 0.5); transform: translateX(-10px); }
  20% { transform: translateX(10px); }
  30% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  50% { transform: translateX(0); }
  100% { border-color: var(--color-gray); box-shadow: var(--shadow-lg); }
}

@keyframes flashClose {
  0% { border-color: var(--color-gray); box-shadow: var(--shadow-lg); }
  20% { border-color: #f1c40f; box-shadow: 0 0 20px rgba(241, 196, 15, 0.4); transform: scale(1.01); }
  60% { border-color: #f9e79f; box-shadow: 0 0 10px rgba(241, 196, 15, 0.2); }
  100% { border-color: var(--color-gray); box-shadow: var(--shadow-lg); transform: scale(1); }
}

/* Card Elements */
.quiz-card-number {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.95em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 25px;
}

.quiz-card-question {
  font-size: 1.6em;
  color: var(--color-dark);
  margin-bottom: 30px;
  line-height: 1.5;
  font-weight: 600;
}

.quiz-card-options {
  display: grid;
  gap: 15px;
  margin-bottom: 20px;
}

.quiz-card-option {
  padding: 18px 24px;
  border: 3px solid var(--color-gray);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-dark);
  font-size: 1.1em;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.quiz-card-option::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(34, 111, 84, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: 0;
}

.quiz-card-option:hover:not(:disabled) {
  border-color: var(--color-secondary);
  background: var(--color-background);
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
}

.quiz-card-option:hover:not(:disabled)::before {
  width: 400px;
  height: 400px;
}

.quiz-card-option:active:not(:disabled) {
  transform: translateX(4px) scale(0.98);
}

.quiz-card-option.correct {
  background: var(--color-accent);
  border-color: var(--color-secondary);
  color: var(--color-dark);
  font-weight: 600;
  animation: correctAnswer 0.6s ease;
}

@keyframes correctAnswer {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.quiz-card-option.correct::after {
  content: '✓';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.8em;
  font-weight: bold;
  color: var(--color-secondary);
  animation: checkmarkPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmarkPop {
  0% { transform: translateY(-50%) scale(0); }
  50% { transform: translateY(-50%) scale(1.2); }
  100% { transform: translateY(-50%) scale(1); }
}

.quiz-card-option.incorrect {
  background: #fdecea;
  border-color: var(--color-primary);
  color: var(--color-primary);
  opacity: 0.9;
  animation: incorrectShake 0.5s ease;
}

@keyframes incorrectShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.quiz-card-option.incorrect::after {
  content: '✗';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.8em;
  font-weight: bold;
  color: var(--color-primary);
  animation: crossPop 0.3s ease;
}

@keyframes crossPop {
  0% { transform: translateY(-50%) scale(0) rotate(0deg); }
  100% { transform: translateY(-50%) scale(1) rotate(180deg); }
}

.quiz-card-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--color-gray-light);
}

.quiz-card-option:disabled {
  cursor: default;
}

.quiz-card-explanation {
  margin-top: 25px;
  padding: 20px;
  background: var(--color-background);
  border-left: 5px solid var(--color-secondary);
  border-radius: var(--radius-sm);
  font-size: 1em;
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

.quiz-card-explanation strong {
  color: var(--color-secondary);
}

.quiz-card-next-btn {
  margin-top: 25px;
  width: 100%;
  padding: 16px;
  font-size: 1.2em;
}

.quiz-card-submit-info {
  text-align: center;
  margin-top: 25px;
  padding: 15px;
  background: var(--color-accent);
  border-radius: var(--radius-md);
  color: var(--color-dark);
  font-weight: 600;
  font-size: 1.1em;
}

/* Quiz Complete Card */
.quiz-complete-card {
  text-align: center;
  padding: 50px 40px;
}

.quiz-complete-emoji {
  font-size: 5em;
  margin-bottom: 20px;
  animation: emojiPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes emojiPop {
  0% { transform: scale(0) rotate(-180deg); }
  50% { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.quiz-complete-title {
  font-size: 2.5em;
  color: var(--color-dark);
  margin-bottom: 30px;
  font-weight: 700;
}

.quiz-complete-score {
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 30px;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
}

.quiz-complete-score-label {
  font-size: 1.2em;
  opacity: 0.9;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.quiz-complete-score-value {
  font-size: 3.5em;
  font-weight: 700;
  margin-bottom: 10px;
  animation: scoreReveal 0.8s ease;
}

@keyframes scoreReveal {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.quiz-complete-score-percent {
  font-size: 1.3em;
  opacity: 0.9;
}

.quiz-complete-info {
  text-align: left;
  margin-bottom: 30px;
  padding: 25px;
  background: var(--color-background);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-gray);
}

.quiz-complete-submit-btn {
  width: 100%;
  padding: 18px;
  font-size: 1.3em;
}

/* Info Card Styles */
.quiz-info-title {
  font-size: 1.8em;
  margin-bottom: 15px;
  color: var(--color-dark);
}

.quiz-info-content {
  font-size: 1.05em;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--color-dark);
}

.quiz-info-content p {
  margin-bottom: 12px;
}

.quiz-info-content ul {
  margin-left: 20px;
  margin-bottom: 12px;
}

.quiz-info-link {
  display: inline-block;
  padding: 12px 24px;
  background: var(--color-secondary);
  color: var(--color-white);
  text-decoration: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.quiz-info-link:hover {
  background: var(--color-accent);
  color: var(--color-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===========================
   RESPONSIVE ADJUSTMENTS
   =========================== */

/* ===========================
   FLOWER TYPES GUIDE (Day 5)
   =========================== */

.flower-types-guide {
  background: var(--color-white);
  padding: 25px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-gray);
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}

.flower-types-guide h3 {
  margin-bottom: 15px;
  color: var(--color-dark);
  font-weight: 700;
  font-size: 1.3em;
}

.flower-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 15px;
  margin-top: 15px;
}

.flower-type-card {
  background: #fafafa;
  padding: 15px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.flower-type-card:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.flower-type-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.flower-type-header strong {
  font-size: 1.1em;
  color: var(--color-dark);
}

.flower-type-rating {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 8px;
  font-weight: 600;
}

.flower-type-card p {
  font-size: 0.9em;
  color: #555;
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .interactive-workspace {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .map-container {
    padding: 15px;
  }
  
  .map-container h3 {
    font-size: 1.1em;
    margin-bottom: 10px;
  }
  
  .map-canvas {
    height: 350px;
  }
  
  .route-builder {
    padding: 15px;
  }
  
  .route-builder h3 {
    font-size: 1.1em;
    margin-bottom: 10px;
  }
  
  .stats-panel {
    padding: 15px;
  }
  
  .stat-row .stat-label {
    font-size: 0.9em;
  }
  
  .stat-row .stat-value {
    font-size: 1.3em;
  }
  
  .stat-value.large {
    font-size: 2em;
    padding: 6px 15px;
  }
  
  .challenge-actions {
    grid-template-columns: 1fr;
  }
  
  .challenge-action-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.9em;
  }
  
  .challenge-submit-btn {
    margin-left: 0;
    width: 100%;
    font-size: 1.05em;
    padding: 16px;
  }
  
  .challenge-feedback-card {
    padding: 18px;
  }

  .feedback-like-row,
  .feedback-submit-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .feedback-like-btn,
  .feedback-submit-btn {
    width: 100%;
    justify-content: center;
  }

  .feedback-like-count,
  .feedback-status {
    text-align: left;
  }
  
  .quiz-card {
    padding: 25px;
  }
  
  .quiz-card-number {
    padding: 6px 15px;
    font-size: 0.85em;
    margin-bottom: 15px;
  }
  
  .quiz-card-question {
    font-size: 1.2em;
    margin-bottom: 20px;
  }
  
  .quiz-card-options {
    gap: 12px;
  }
  
  .quiz-card-option {
    padding: 14px 18px;
    font-size: 1em;
  }
  
  .quiz-card-explanation {
    padding: 15px;
    font-size: 0.95em;
  }
  
  .quiz-complete-emoji {
    font-size: 3.5em;
  }
  
  .quiz-complete-title {
    font-size: 1.8em;
  }
  
  .quiz-complete-score-value {
    font-size: 2.5em;
  }
  
  .quiz-question-text {
    font-size: 1.1em;
  }
  
  .quiz-option {
    padding: 12px 15px;
  }
  
  .intervention-list {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .intervention-card {
    padding: 15px;
  }
  
  .flower-types-grid {
    grid-template-columns: 1fr;
  }
  
  .challenge-header {
    padding: 20px;
  }
  
  .challenge-header h2 {
    font-size: 1.6em;
  }
  
  .challenge-description {
    padding: 20px;
  }
  
  .challenge-content {
    padding: 20px;
  }
}

/* Slider-based quiz extras */
.slider-scenario {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
  padding: 20px;
  border: 2px dashed var(--color-gray-light);
  border-radius: var(--radius-md);
  background: var(--color-background);
}

.slider-scenario p {
  margin: 6px 0 0;
  color: var(--color-dark);
  line-height: 1.4;
}

.scenario-label {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
  font-weight: 700;
}

.slider-response {
  background: var(--color-background);
  border-radius: var(--radius-md);
  padding: 25px;
  border: 2px solid var(--color-gray-light);
  margin-bottom: 20px;
}

.slider-value-display {
  text-align: center;
  font-size: 1.4em;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 15px;
}

.slider-value-more,
.slider-value-less,
.slider-value-neutral {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.slider-value-more {
  color: #c0392b;
  background: rgba(192, 57, 43, 0.15);
}

.slider-value-less {
  color: #1b5e20;
  background: rgba(27, 94, 32, 0.15);
}

.slider-value-neutral {
  color: var(--color-gray-dark);
  background: rgba(0, 0, 0, 0.08);
}

.slider-control {
  width: 100%;
  margin: 10px 0;
  accent-color: var(--color-accent);
}

.slider-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  color: var(--color-gray-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.slider-submit-btn {
  width: 100%;
  margin-top: 20px;
}

.slider-feedback {
  padding: 20px;
  background: #eef8f1;
  border-radius: var(--radius-md);
  border: 1px solid rgba(34, 111, 84, 0.2);
  margin-top: 10px;
  line-height: 1.6;
}

.slider-feedback p {
  margin: 6px 0;
}

.slider-feedback-delta {
  font-weight: 700;
  color: var(--color-accent);
}

.slider-feedback-points {
  font-weight: 600;
  color: var(--color-secondary);
}

.slider-feedback-fact {
  margin-top: 12px;
  font-style: italic;
}

/* Santa Workshop (Day 24) */
.stat-label {
  display: block;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--color-gray-dark);
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.santa-game {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 25px;
  margin-top: 30px;
  align-items: start;
}

@media (max-width: 960px) {
  .santa-game {
    grid-template-columns: 1fr;
  }
  #santaCanvas {
    width: 100%;
  }
}

#santaCanvas {
  width: 100%;
  max-width: 640px;
  border: 3px solid var(--color-gray);
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top, #14213d 0%, #0b1326 60%);
  box-shadow: var(--shadow-lg);
}

.game-panel {
  background: var(--color-white);
  border: 2px solid var(--color-gray-light);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.game-stats {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}

#livesContainer {
  display: flex;
  gap: 6px;
}

.life-heart {
  font-size: 1.3rem;
}

.game-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.touch-controls {
  display: flex;
  gap: 10px;
}

.game-message {
  font-size: 0.95rem;
  margin: 15px 0;
  min-height: 40px;
}

.game-submit {
  width: 100%;
}
