/* CSS Document */

.challenge-container {
  display: flex;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.editor-side, .preview-side {
  flex: 1;
  padding: 20px;
  border-radius: 12px;
  /*background: #f8f9fa;*/
	color:#ffffff;
}
.code-box {
  background: #1e1e1e;
  color: #fff;
  padding: 15px;
  border-radius: 6px;
  font-family: monospace;
}
#colorInput {
  background: #333;
  color: #a2d2ff;
  border: 1px dashed #666;
  padding: 2px 8px;
  font-family: monospace;
  font-size: 16px;
  width: 120px;
}
.card {
  background: gray; /* Default starting color */
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  color: white;
  transition: background 0.3s ease; /* Makes color change smooth */
}
/* Default layout when messy */
.gallery-default {
  display: block;
}
.gallery-default .avatar-card {
  margin-bottom: 10px;
  background: #22223b;
  color: white;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* CONGRATULATIONS SUMMARY DASHBOARD STYLES */
.dashboard-overlay {
  display: none; /* Stays hidden until triggered by JS */
  background: linear-gradient(135deg, #1e1b4b 0%, #311042 100%);
  padding: 40px 20px;
  border-radius: 16px;
  max-width: 800px;
  margin: 40px auto;
  color: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.congrats-card { text-align: center; }
.badge-glow {
  font-size: 4rem;
  background: rgba(123, 44, 191, 0.2);
  width: 100px;
  height: 100px;
  line-height: 100px;
  border-radius: 50px;
  margin: 0 auto 15px;
  box-shadow: 0 0 25px #7b2cbf;
  animation: pulse 2s infinite alternate;
}
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 15px #7b2cbf; }
  100% { transform: scale(1.05); box-shadow: 0 0 35px #a2d2ff; }
}
.skills-showcase {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 12px;
  margin: 30px 0;
}
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 15px;
}
.skill-badge {
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}
.skill-badge h4 { margin: 8px 0 4px 0; color: #a2d2ff; }
.skill-badge p { font-size: 0.85rem; color: #ccc; margin: 0; }
.pathway-split {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.track-box {
  flex: 1;
  min-width: 250px;
  background: rgba(255, 255, 255, 0.08);
  padding: 20px;
  border-radius: 12px;
  border-top: 4px solid #7b2cbf;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.track-box h4 { margin: 0 0 10px 0; font-size: 1.1rem; }
.track-box p { font-size: 0.9rem; color: #ddd; margin-bottom: 15px; }
.btn-primary { background: #7b2cbf; color: white; border: none; padding: 12px; width: 100%; border-radius: 6px; font-weight: bold; cursor: pointer; transition: background 0.2s; }
.btn-primary:hover { background: #9d4edf; }
.btn-secondary { background: transparent; color: #2a9d8f; border: 2px solid #2a9d8f; padding: 10px; width: 100%; border-radius: 6px; font-weight: bold; cursor: pointer; transition: all 0.2s; }
.btn-secondary:hover { background: #2a9d8f; color: white; }
.share-buttons { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.btn-share { padding: 8px 16px; border: none; color: white; font-size: 0.85rem; border-radius: 4px; cursor: pointer; font-weight: bold; }
.btn-share.tw { background: #111; }
.btn-share.li { background: #0077b5; }

/* Ensure the preview area clips overflowing confetti particles */
.interactive-canvas-box {
  position: relative;
  overflow: hidden;
}

/* Individual particle starting properties */
.local-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none; /* Prevents clicking on individual particles */
  animation: explodeAndFade 1.2s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

/* The physics engine animation keyframe */
@keyframes explodeAndFade {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    /* Moves the particle to its uniquely generated random target position */
    transform: translate(var(--x), var(--y)) scale(0.3) rotate(360deg);
    opacity: 0;
  }
}


/* ===================================================
   RESPONSIVE DESIGN OVERRIDES FOR MOBILE DEVICES
   =================================================== */

@media screen and (max-width: 768px) {
  /* 1. Turn horizontal splits into a vertical stacked stack */
  .challenge-container {
    flex-direction: column;
    gap: 15px;
    padding: 10px;
  }

  /* 2. Force blocks to fill full device screen widths safely */
  .editor-side, .preview-side {
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
  }

  /* 3. Adjust the inner code box font sizing for small screen scales */
  .code-box {
    font-size: 14px;
    padding: 12px;
    line-height: 1.6;
    overflow-x: auto; /* Adds responsive scrolling if code lines clip */
  }

  /* 4. Make input fields wider for comfortable thumb typing accessibility */
  #colorInput, #layoutInput, #particleInput {
    width: 100%;
    max-width: 140px;
    font-size: 15px;
    padding: 4px 6px;
    margin: 4px 0;
    display: inline-block;
  }

  /* 5. Scale down major typography headings so they don't break boundaries */
  .editor-side h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }

  /* 6. Stack congratulations dashboard pathways into one list column */
  .pathway-split {
    flex-direction: column;
    gap: 15px;
  }

  .track-box {
    width: 100%;
  }

  /* 7. Optimize certificate name input layout text frame dimensions */
  #studentNameInput {
    max-width: 100% !important;
  }
}




.quiz-section {margin: 0px auto; font-family: sans-serif; position: relative;
       min-height: 70vh;
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    background: radial-gradient(circle at center, #260e3b 0%, #0d0614 85%);
    overflow: visible;}


.reveal2.show {
    opacity: 1;
    transform: none;
	 background: radial-gradient(circle at center, #260e3b 0%, #0d0614 85%);
	height:17vh;
	padding:2%;
}

.intro2{
text-align: center;
    /* max-width: 1060px; 
    margin: 0 auto 58px;*/
}
.intro2 h2 {
    font: 400 clamp(46px, 6vw, 59px) / 0.95 Georgia, serif;
    margin: 12px 0;
}

.quiz-container { background: #1e1b4b; border-radius: 16px; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); color: #fff; }

/* Progress Frame */
.quiz-progress-wrapper { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; margin-bottom: 30px; overflow: hidden; }
.quiz-progress-bar { height: 100%; background: #7b2cbf; transition: width 0.4s ease; }

/* Step Visibilities */
.quiz-step { display: none; }
.quiz-step.is-active { display: block; animation: fadeIn 0.3s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.quiz-step h2 { font-size: 1.4rem; color: #a2d2ff; margin-bottom: 20px; line-height: 1.4; }
.quiz-options { display: flex; flex-direction: column; gap: 12px; }

/* Interactive Option Buttons */
.quiz-opt-btn { 
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255,255,255,0.1); 
  border-radius: 8px; color: #fff; padding: 16px; text-align: left; 
  font-size: 1rem; cursor: pointer; transition: all 0.2s; 
}
.quiz-opt-btn:hover { background: #7b2cbf; border-color: #a2d2ff; transform: translateX(4px); }


.quiz-result-step {
  animation: fadeIn 0.4s ease-in-out forwards;
  text-align: center;
	background: radial-gradient(circle at center, #260e3b 0%, #0d0614 85%);
	color:#ffffff;
	padding:2%;
}
.reflection-bubble {
  background: rgba(123, 44, 191, 0.15);
  border-left: 4px solid #a2d2ff;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: left;
  line-height: 1.6;
  font-size: 1.1rem;
}
.reflection-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.reflection-list li {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 15px;
  border-radius: 6px;
  border-inline-start: 3px solid #2a9d8f;
}
.reflection-closing {
  font-size: 0.9rem;
  color: #aaa;
  margin-top: 25px;
  font-style: italic;
}
