/* ===== Interactive Activities Styles ===== */

.activity-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.activity-prompt {
  text-align: center;
  margin-bottom: 1.5rem;
  width: 100%;
}

.activity-prompt h3 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.activity-prompt p {
  color: var(--text-soft);
  font-size: 1rem;
}

/* Choice / Tap to Select */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  max-width: 360px;
}

.choice-btn {
  background: white;
  border: 4px solid #E0E0E0;
  border-radius: 20px;
  padding: 1.25rem 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-height: 100px;
}

.choice-btn .choice-emoji {
  font-size: 2.5rem;
}

.choice-btn:active {
  transform: scale(0.96);
}

.choice-btn.selected {
  border-color: var(--primary);
  background: #FFF5EB;
}

.choice-btn.correct {
  border-color: var(--success);
  background: #E8F5E9;
  animation: pop 0.4s ease;
}

.choice-btn.wrong {
  border-color: #FF7675;
  background: #FFF0F0;
  animation: shake 0.4s ease;
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

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

/* Sound matching */
.sound-display {
  background: white;
  border-radius: 24px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 4px solid var(--primary);
}

.sound-display .big-letter {
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1;
}

.sound-display .sound-label {
  font-size: 1.2rem;
  color: var(--text-soft);
  margin-top: 0.25rem;
}

.btn-play-sound {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
  margin-top: 0.75rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255,159,67,0.4);
}

/* Counting */
.count-area {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 1rem 0 1.5rem;
  min-height: 80px;
}

.count-item {
  font-size: 2.8rem;
  cursor: pointer;
  transition: transform 0.15s;
  user-select: none;
}

.count-item:active {
  transform: scale(1.15);
}

.count-item.counted {
  opacity: 0.4;
  transform: scale(0.9);
}

.count-display {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-dark);
  background: white;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

/* Drag and Drop / Matching */
.match-board {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 380px;
}

.match-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: white;
  border-radius: 16px;
  padding: 0.75rem;
  box-shadow: var(--shadow-soft);
}

.match-target {
  width: 70px;
  height: 70px;
  border: 3px dashed #CCC;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  background: #FAFAFA;
  transition: border-color 0.2s, background 0.2s;
}

.match-target.filled {
  border-style: solid;
  border-color: var(--success);
  background: #E8F5E9;
}

.match-label {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 600;
}

.draggable-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1.25rem;
  min-height: 70px;
}

.draggable {
  width: 64px;
  height: 64px;
  background: white;
  border: 3px solid var(--primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: grab;
  box-shadow: var(--shadow-soft);
  user-select: none;
  touch-action: none;
}

.draggable.dragging {
  opacity: 0.6;
  transform: scale(1.1);
}

/* Pattern */
.pattern-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.pattern-item {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: white;
  border: 3px solid #E0E0E0;
}

.pattern-item.missing {
  border: 3px dashed var(--primary);
  background: #FFF8F0;
  font-size: 1.4rem;
  color: var(--primary);
}

/* Sorting */
.sort-bins {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 400px;
  margin-bottom: 1.25rem;
}

.sort-bin {
  flex: 1;
  background: white;
  border-radius: 16px;
  padding: 0.75rem;
  min-height: 120px;
  box-shadow: var(--shadow-soft);
  border: 3px solid #E0E0E0;
}

.sort-bin h4 {
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-soft);
}

.sort-bin-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  min-height: 50px;
}

.sort-item {
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 8px;
  transition: background 0.15s;
}

.sort-item:active {
  background: #F0F0F0;
}

/* Feedback */
.activity-feedback {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 1.25rem 1.5rem;
  padding-bottom: max(1.25rem, var(--safe-bottom));
  box-shadow: 0 -8px 30px rgba(0,0,0,0.12);
  text-align: center;
  z-index: 50;
  animation: slideUp 0.3s ease;
}

.activity-feedback.hidden {
  display: none;
}

.feedback-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.4rem;
}

.feedback-msg {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.feedback-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn-feedback {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  background: #F0F0F0;
}

.btn-feedback.primary {
  background: var(--primary);
  color: white;
}

/* Story / Moral */
.story-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  max-width: 420px;
  width: 100%;
}

.story-illustration {
  background: linear-gradient(135deg, #A29BFE, #74B9FF);
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.story-body {
  padding: 1.25rem;
}

.story-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.story-text {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 1rem;
}

.story-questions {
  margin-top: 1rem;
}

.story-q {
  background: #F8F9FA;
  border-radius: 12px;
  padding: 0.85rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.story-q strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--primary-dark);
}

/* Memory game */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  max-width: 300px;
}

.memory-card {
  aspect-ratio: 1;
  background: var(--primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  color: white;
  transition: transform 0.2s;
  border: none;
}

.memory-card.flipped, .memory-card.matched {
  background: white;
  color: var(--text);
  border: 3px solid var(--success);
}

.memory-card.matched {
  opacity: 0.7;
}

/* Drawing (simple) */
.draw-canvas-wrap {
  width: 100%;
  max-width: 320px;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 3px solid #E0E0E0;
}

#draw-canvas {
  display: block;
  width: 100%;
  height: 240px;
  touch-action: none;
  cursor: crosshair;
}

.draw-tools {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.color-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  cursor: pointer;
}

.color-btn.active {
  border-color: var(--text);
  transform: scale(1.15);
}
