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

body {
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  padding: 10px;
  background: #F5F0EC;
  color: #262626;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.activity-wrapper {
  display: inline-block;
  background: #fff;
  border-radius: 18px;
  padding: 30px;
  box-sizing: border-box;
  max-width: 66%;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease, height 0.4s ease, max-height 0.4s ease;
  margin: 10px 0;
  overflow: hidden;
}

.activity-wrapper > *:last-child {
  margin-bottom: 0;
}

.activity-header {
  background: #00CA72;
  margin: -30px -30px 20px -30px;
  padding: 0 10px 0 0;
  border-radius: 18px 18px 0 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.activity-header h1 {
  color: #262626;
  margin-bottom: 10px;
  font-size: 28px;
}

.activity-header h2,
.activity-header h3,
.activity-header p {
  color: #262626;
  margin-bottom: 10px;
}

.activity-header p:last-child {
  margin-bottom: 0;
}

h1, h2, h3 {
  font-weight: bold;
  margin-bottom: 10px;
  color: #262626;
}

p, .instructions {
  font-size: 18px;
  margin: 10px auto 20px;
  max-width: 700px;
  line-height: 1.5;
}

/* Utilities */
.hidden { display: none; }
.selected { background: #e1a8f0; }
.inactive { opacity: 0.5; pointer-events: none; }
.correct { background: #00ca72; color: white; }
.incorrect { background: #f44336; color: white; }

/* Buttons */
button {
  font-size: 16px;
  padding: 12px 24px;
  margin: 10px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-weight: bold;
  font-family: 'DM Sans', Arial, sans-serif;
  background: #262626;
  color: #fff;
  border-radius: 50px;
}

button:hover {
  background: #4a4a4a;
}

button:disabled {
  background: #bfbfbf;
  color: #fff;
  cursor: not-allowed;
  border-color: #bfbfbf;
}

.btn-submit,
.btn-primary,
.btn-used {
  background: #00CA72;
  color: #262626;
  border-radius: 50px;
  text-decoration: none;
}

.btn-submit:hover:not(:disabled),
.btn-primary:hover:not(:disabled),
.btn-used:hover:not(:disabled) {
  background: #009954;
}

.btn-submit:disabled,
.btn-primary:disabled,
.btn-used:disabled {
  background: #80CAA0;
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-reset {
  background: transparent;
  color: #262626;
  border: 2px solid #262626;
  border-radius: 50px;
  text-decoration: none;
}

.btn-reset:hover {
  background: #f5f0ec;
}

.btn-reset:disabled {
  background: transparent;
  color: #bfbfbf;
  border-color: #bfbfbf;
}

.btn-k2-symbol {
  font-size: 25px !important;
  line-height: 1 !important;
  padding: 8px 40px !important;
}

.btn-reset.btn-k2-symbol {
  font-size: 32.5px !important;
  padding: 6px 40px 10px 40px !important;
}

/* Navigation */
.back-link, .dashboard-link {
  display: block;
  margin-top: 20px;
  text-decoration: none;
  color: #80089d;
  font-weight: 500;
}

.back-link:hover { text-decoration: underline; }

/* Feedback & Instructions */
.activity-instructions {
  font-size: 16px;
  margin: 0;
  max-width: 700px;
  line-height: 1.5;
  padding: 0 45px;
}

.activity-feedback {
  margin: 10px auto 20px;
  padding: 15px 20px;
  border-radius: 8px;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  min-height: 50px;
  display: inline-block;
  max-width: 100%;
}

.activity-feedback.activity-feedback-success {
  background: #c1f2dc;
  color: #2d633d;
  border: 2px solid #00ca72;
}

.activity-feedback.activity-feedback-error {
  background: #ffcdd2;
  color: #c62828;
  border: 2px solid #f44336;
}

.activity-controls {
  margin: 20px 0 0 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Common Components */
.card {
  border: 2px solid #262626;
  border-radius: 10px;
  padding: 20px;
  margin: 20px auto;
  background: #ece6fd;
  color: #262626;
}

/* Common Draggable Cards */
.card-draggable {
  padding: 10px 20px !important;
  border: none !important;
  border-bottom: 5px solid #a185eb !important;
  background: #ece6fd !important;
  color: #262626 !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: grab !important;
  user-select: none;
  transition: all 0.2s ease !important;
}

.card-draggable:hover {
  transform: translateY(-2px) !important;
}

.card-draggable:active {
  transform: translateY(0) !important;
}

.card-draggable.dragging {
  opacity: 0.5;
  cursor: grabbing !important;
}

.card-draggable.active {
  box-shadow: 0 0 0 3px #00ca72;
}

.tile {
  padding: 10px 20px;
  background: #ece6fd;
  color: #262626;
  border: 2px solid #262626;
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
}

.tile.selected { border: 2px solid #a185eb; background: #ece6fd; }

.option {
  display: inline-block;
  padding: 8px 12px;
  margin: 5px;
  border: 2px solid #262626;
  border-radius: 6px;
  background: #ece6fd;
  color: #262626;
  cursor: pointer;
}

.option:hover { background: #f5f0ec; }

/* Common Dropzone */
.zone-drop {
  border: 2px dashed #bfbfbf;
  border-radius: 6px;
  text-align: center;
  transition: all 0.2s;
}

.dropzone {
  min-height: 30px;
  padding: 5px;
}

.dropzone.filled { border-style: solid; background: #e5faf1; }

/* Reading Drawer & Quiz */
.quiz-container {
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
  height: 100vh;
  overflow-y: auto;
  padding-bottom: 300px;
}

.quiz-container h2 { margin-bottom: 30px; font-size: 24px; }

.question-box {
  background: white;
  border: 2px dashed #bfbfbf;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 8px;
}

.question-text {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.review-hint {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 12px;
  background: #c1f2dc;
  border: 1px solid #00ca72;
  border-radius: 5px;
  font-size: 16px;
  color: #2d633d;
}

.answers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

@media (max-width: 900px) {
  .answers-grid { grid-template-columns: 1fr; }
}

.answer-option {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: #ece6fd;
  border: 2px solid #a185eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 60px;
}

.answer-option:hover {
  background: #d8c3e1;
  transform: translateX(5px);
}

.answer-option input[type="radio"] {
  width: 30px;
  height: 30px;
  margin-right: 20px;
  cursor: pointer;
}

.answer-option label {
  flex: 1;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.4;
}

.submit-button {
  display: block;
  width: 200px;
  margin: 0 auto;
  padding: 15px 40px;
  background: #00ca72;
  color: white;
  border: none;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 8px;
}

.submit-button:hover { background: #009954; }
.submit-button:disabled { background: #bfbfbf; cursor: not-allowed; }

.reading-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 750px;
  max-width: 90%;
  height: 85%;
  background: white;
  border: 3px solid #262626;
  box-shadow: 0 10px 50px rgba(38, 38, 38, 0.3);
  transition: all 0.4s ease-in-out;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
}

.reading-overlay.minimized {
  top: auto;
  bottom: 0;
  transform: translateX(-50%);
  height: 15%;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -5px 20px rgba(38, 38, 38, 0.2);
}

.reading-overlay.minimized .reading-content { display: none; }
.reading-overlay.minimized .drawer-tab { display: block; }

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(38, 38, 38, 0.3);
  z-index: 999;
  transition: opacity 0.4s;
}

.backdrop.hidden { opacity: 0; pointer-events: none; }

.drawer-tab {
  padding: 15px;
  background: #f5f0ec;
  border-bottom: 2px solid #262626;
  text-align: center;
  cursor: pointer;
  font-weight: bold;
  user-select: none;
  font-size: 16px;
  display: none;
}

.drawer-tab:hover { background: #c1c1c1; }

.reading-content {
  flex: 1;
  padding: 40px 50px;
  overflow-y: auto;
}

.reading-content h1 {
  margin-bottom: 30px;
  font-size: 32px;
  text-align: center;
}

.reading-content p {
  margin-bottom: 15px;
  line-height: 1.6;
  font-size: 16px;
}

.highlight {
  background: #e6b3f0;
  transition: background-color 0.3s;
}

.audio-controls {
  margin-bottom: 20px;
  padding: 15px;
  background: #f5f0ec;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.audio-controls button {
  padding: 10px 20px;
  background: #262626;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  font-size: 16px;
}

.audio-controls button:hover { background: #4a4a4a; }
.audio-controls audio { flex: 1; }

.start-button {
  display: block;
  margin: 30px auto 0;
  padding: 15px 40px;
  background: #80089d;
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 5px;
}

.start-button:hover { background: #6a0784; }

/* Letter Tracing */
.tracing-controls { margin: 10px 0 20px; }

.tracing-svg {
  border: 2px solid #bfbfbf;
  background: #fff;
  display: block;
  margin: 20px auto;
}

.tracing-hint {
  stroke: #c1c1c1;
  stroke-width: 8;
  fill: none;
  stroke-dasharray: 10 8;
}

.tracing-hint.tracing-hint-active { stroke: #262626; }
.tracing-hint.tracing-hint-completed { stroke: #bfbfbf; }

.tracing-stroke {
  stroke: #00ca72;
  stroke-width: 8;
  fill: none;
}

.tracing-endpoint {
  stroke-width: 2;
  cursor: pointer;
  display: none;
}

.tracing-endpoint.tracing-start {
  fill: #00ca72;
  stroke: #2d633d;
}

.tracing-endpoint.tracing-end {
  fill: #f44336;
  stroke: #c62828;
}

.tracing-endpoint.tracing-endpoint-active { fill: #50d791; }
.tracing-endpoint.tracing-endpoint-completed { fill: #2d633d; }

.tracing-label {
  font-size: 16px;
  font-weight: bold;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  display: none;
  user-select: none;
  fill: white;
}

@keyframes tracing-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

.tracing-endpoint.tracing-pulse {
  animation: tracing-pulse 1s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

/* Dynamic Card Sorting */
.sorting-buckets {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 20px 0 10px 0;
  flex-wrap: wrap;
}

.sorting-bucket {
  width: 300px;
  min-height: 180px;
  border: 3px dashed #bfbfbf;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

.sorting-bucket-label {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 18px;
}

.sorting-bucket-drop {
  flex: 1;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 10px;
  min-height: 120px;
  position: relative;
}

.sorting-bucket-drop:empty::before {
  content: 'Drop card here';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #bfbfbf;
  font-style: italic;
  font-size: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.sorting-bucket-drop.show-hint:empty::before {
  opacity: 1;
}

.sorting-cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 10px 0;
  flex-wrap: wrap;
  min-height: 100px;
  align-items: center;
  transition: min-height 0.4s ease;
}

.sorting-card {
  max-width: 280px;
  border: 2px solid #262626;
  border-radius: 8px;
  background: #ece6fd;
  color: #262626;
  padding: 8px 12px;
  text-align: left;
  cursor: grab;
  font-size: 16px;
  line-height: 1.3;
  transition: all 0.3s;
  margin: 4px;
  flex-shrink: 0;
}

.sorting-card.sorting-card-placed {
  cursor: default;
}
.sorting-card.sorting-card-correct { border-color: #00ca72; }
.sorting-card.sorting-card-incorrect { border-color: #f44336; }
.sorting-card.sorting-card-fadeout { opacity: 0; transform: scale(0.9); }

/* Matching Pairs - Vertical Columns */
.matching-columns {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px auto;
  flex-wrap: nowrap;
  max-width: 800px;
}

.matching-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 0;
  background: #fafafa;
  border: 2px solid #d8d8d8;
  border-radius: 12px;
  padding: 16px 12px 12px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.matching-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px auto;
  flex-wrap: wrap;
}

.matching-option {
  color: #262626;
  font-weight: bold;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  flex-shrink: 0;
  margin-bottom: 12px;
  min-height: 80px;
  padding: 16px 8px;
}

.matching-dropzone {
  min-height: 80px;
  padding: 12px;
  border: 2px dashed #d8d8d8;
  border-radius: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 16px;
  flex-shrink: 0;
  background: #fff;
}

.matching-dropzone.matching-dropzone-filled {
  border-style: solid;
  border-color: #a185eb;
  background: #f5f0ec;
}

.matching-dropzone.matching-dropzone-correct {
  border-color: #00ca72;
  background: #c1f2dc;
}

.matching-dropzone.matching-dropzone-incorrect {
  border-color: #f44336;
  background: #ffebee;
}

/* Hot Spot */
.empty-header {
  min-height: 0;
  display: flex;
  align-items: center;
}

.progress-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #fff;
  transition: background-color 0.3s ease;
}

.progress-dot.completed {
  background: #80089d;
  border-color: #80089d;
}

.instructions-section-white {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  margin-bottom: 0;
  gap: 4px;
}

.instructions-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.title-with-audio {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.activity-title {
  font-size: 26px;
  font-weight: 900;
  color: #262626;
  margin: 0;
  line-height: 1.2;
}

.instructions-with-button {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hotspot-instructions {
  font-size: 16px;
  font-weight: normal;
  color: #262626;
  margin: 0;
  line-height: 1.4;
  text-align: center;
}

.logo-section {
  display: flex;
  align-items: center;
  margin-right: 25px;
}

.amira-logo {
  width: 120px;
  height: 35px;
  object-fit: contain;
}

.btn-audio {
  background: #262626 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 50% !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.btn-audio:hover {
  background: #4a4a4a;
  transform: scale(1.05);
}

.btn-audio:active {
  transform: scale(0.95);
}

.btn-audio.speaking {
  animation: pulse-audio 0.8s ease-in-out infinite;
}

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

.audio-icon {
  font-size: 16px;
  line-height: 1;
}

.hotspot-container {
  position: relative;
  display: inline-block;
  width: 60vw;
  margin: 20px auto;
}

.hotspot-image {
  width: 100%;
  height: auto;
  display: block;
  border: 2px solid #bfbfbf;
  border-radius: 8px;
}

.hotspot-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hotspot-area {
  fill: transparent;
  stroke: none;
  rx: 15;
  ry: 15;
  pointer-events: all;
  cursor: pointer;
  transition: all 0.2s;
}

.hotspot-area.hotspot-selected {
  fill: rgba(128, 8, 157, 0.4);
  stroke: rgba(128, 8, 157, 0.6);
  stroke-width: 3;
}

.hotspot-area.hotspot-correct {
  fill: rgba(0, 202, 114, 0.4);
  stroke: rgba(0, 202, 114, 0.6);
  stroke-width: 3;
}

.hotspot-area.hotspot-incorrect {
  fill: rgba(255, 0, 0, 0.4);
  stroke: rgba(255, 0, 0, 0.6);
  stroke-width: 3;
}

/* Word Ladder */
.ladder-wrapper {
  position: relative;
  display: inline-block;
  margin: 15px auto;
}

.ladder-rail {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16px;
  background: #262626;
  border-radius: 8px;
}

.ladder-rail-left { left: 0; }
.ladder-rail-right { right: 0; }

.ladder {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  padding: 0 24px;
  width: 260px;
  margin: 0 auto;
}

.ladder-rung {
  width: 100%;
  min-height: 50px;
  border: 2px solid #262626;
  margin: 18px 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  background: #fff;
  position: relative;
  padding: 10px;
  text-align: center;
}

.ladder-rung::after {
  content: '';
  position: absolute;
  bottom: -18px;
  left: -24px;
  right: -24px;
  height: 6px;
  background: #262626;
  border-radius: 3px;
}

.ladder-rung:first-child::after { display: none; }

.ladder-rung.ladder-rung-locked {
  background: #f5f0ec;
  color: #bfbfbf;
}

.ladder-rung.ladder-rung-correct {
  background: #c1f2dc;
  color: #2d633d;
  border-color: #00ca72;
}

.ladder-word-bank {
  margin: 15px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 500px;
}

.ladder-tile {
  padding: 8px 16px;
  background: #ece6fd;
  color: #262626;
  border: 2px solid #262626;
  border-radius: 6px;
  cursor: grab;
  font-size: 16px;
  user-select: none;
  min-width: 80px;
  text-align: center;
  font-weight: 500;
  transition: all 0.2s;
}

.ladder-tile:hover {
  background: #d8c3e1;
  transform: translateY(-2px);
}

/* Word Web */
.web-container {
  position: relative;
  width: 50vh;
  height: 50vh;
  max-width: 600px;
  max-height: 600px;
  margin: 30px auto;
}

.web-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.web-target {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid #262626;
  border-radius: 50%;
  padding: 20px 30px;
  font-weight: bold;
  font-size: 22px;
  background: #fff;
  z-index: 10;
}

.web-arm {
  position: absolute;
  width: 140px;
  height: 56px;
  border: 2px solid #bfbfbf;
  border-radius: 25px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  overflow: hidden;
  transition: all 0.3s;
  padding: 6px 10px;
  z-index: 5;
}

.web-arm.web-arm-active {
  border-color: #80089d;
  border-width: 3px;
  box-shadow: 0 0 8px rgba(128, 8, 157, 0.3);
}

.web-arm.web-arm-locked {
  border-color: #c1c1c1;
  background: #fff;
}

.web-arm.web-arm-locked .web-arm-title,
.web-arm.web-arm-locked .web-arm-answer {
  color: #bfbfbf;
}

.web-arm.web-arm-completed {
  border-color: #bfbfbf;
}

.web-arm.web-arm-correct {
  background: #c1f2dc;
  border-color: #2d633d;
}

.web-arm.web-arm-incorrect {
  background: #ffebee;
  border-color: #c62828;
}

.web-arm-title {
  font-size: 16px;
  font-weight: bold;
  color: #4a4a4a;
  margin-bottom: 4px;
}

.web-arm-answer {
  font-size: 16px;
  text-align: center;
  line-height: 1.2;
}

/* Hexagon formation */
#arm1 { top: 8%; left: 50%; transform: translateX(-50%); }
#arm2 { top: 24%; right: 2%; }
#arm3 { bottom: 24%; right: 2%; }
#arm4 { bottom: 8%; left: 50%; transform: translateX(-50%); }
#arm5 { bottom: 24%; left: 2%; }
#arm6 { top: 24%; left: 2%; }

.web-options {
  margin: 30px auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 700px;
}

.web-option {
  padding: 12px 20px;
  border: 2px solid #262626;
  border-radius: 8px;
  background: #ece6fd;
  color: #262626;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  user-select: none;
}

.web-option:hover {
  background: #f5f0ec;
  transform: translateY(-2px);
}

/* Root Word Tree */
.tree-container {
  display: inline-block;
  padding: 40px;
  border: 2px solid #bfbfbf;
  border-radius: 10px;
  margin: 20px auto;
  background-image: url('treeBG.jpg');
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  min-width: 700px;
  min-height: 500px;
  position: relative;
  padding-bottom: 80px;
}

.tree-row {
  display: flex;
  justify-content: center;
  margin: 10px 0;
  gap: 10px;
  flex-wrap: wrap;
}

.tree-slot {
  width: 180px;
  min-height: 60px;
  border: 2px dashed #bfbfbf;
  border-radius: 8px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: all 0.2s;
}

.tree-slot.tree-slot-filled {
  border-style: solid;
  border-color: #262626;
}

.tree-slot.tree-slot-correct {
  border-color: #00ca72;
  background: #c1f2dc;
}

.tree-slot.tree-slot-incorrect {
  border-color: #f44336;
  background: #ffebee;
}

.tree-clue {
  font-size: 16px;
  margin-bottom: 5px;
  text-align: center;
  color: #4a4a4a;
  line-height: 1.3;
}

.tree-card {
  margin: 4px;
  padding: 8px 14px;
  background: #ece6fd;
  border: 2px solid #80089d;
  border-radius: 6px;
  user-select: none;
  font-weight: 500;
}

.tree-draggable {
  margin: 4px;
  padding: 8px 14px;
  background: #ece6fd;
  color: #262626;
  border: 2px solid #262626;
  border-radius: 6px;
  cursor: grab;
  user-select: none;
  transition: all 0.2s;
}

.tree-draggable:hover {
  background: #f5f0ec;
  transform: translateY(-2px);
}

.tree-draggable.tree-draggable-selected {
  border-color: #80089d;
  background: #d8c3e1;
}

.tree-word-bank {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.tree-root-info {
  font-weight: bold;
  padding: 12px 18px;
  background: rgba(38, 38, 38, 0.9);
  color: #fff;
  border-radius: 8px;
  line-height: 1.6;
  display: inline-block;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

/* Word Expert Card */
.expert-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  width: 66vw;
  max-width: 800px;
  margin: 20px auto;
  border: 2px solid #bfbfbf;
  padding: 15px;
  border-radius: 12px;
  background: #f5f0ec;
}

@media (max-width: 768px) {
  .expert-card { grid-template-columns: 1fr; width: 90vw; }
}

.expert-box {
  border: 2px dashed #bfbfbf;
  padding: 12px;
  text-align: center;
  border-radius: 8px;
  background: #fff;
  transition: all 0.3s;
  height: 180px;
  display: flex;
  flex-direction: column;
}

.expert-box.expert-box-locked {
  opacity: 0.5;
  pointer-events: none;
}

.expert-box.expert-box-active {
  opacity: 1;
  border-color: #80089d;
  border-style: solid;
}

.expert-box.expert-box-correct {
  border-color: #00ca72;
  background: #c1f2dc;
}

.expert-box.expert-box-incorrect {
  border-color: #f44336;
  background: #ffebee;
}

.expert-box h3 {
  margin-bottom: 8px;
  font-size: 16px;
  color: #262626;
  flex-shrink: 0;
}

.expert-choices {
  display: none;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}

.expert-choices.expert-choices-active { display: flex; }

.expert-choices button {
  padding: 16px 20px;
  border: none;
  border-bottom: 5px solid #a185eb;
  border-radius: 12px;
  cursor: pointer;
  background: #ece6fd;
  color: #262626;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  transition: all 0.2s;
  max-width: 100%;
  flex-shrink: 0;
}

.expert-choices button:hover {
  transform: translateY(-2px);
}

.expert-choices button:active {
  transform: translateY(0);
}

.expert-choices button.expert-emoji {
  font-size: 48px;
  padding: 20px 30px;
  font-weight: normal;
}

.expert-choices button.expert-choice-selected {
  background: #80089d;
  color: white;
  border-bottom-color: #5a0070;
}

/* Letter drag area */
.expert-letter-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  flex: 1;
}

.expert-letter-drop {
  min-height: 60px;
  min-width: 180px;
  border: 2px dashed #d8d8d8;
  border-radius: 8px;
  padding: 11px 8px;
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}

.expert-letter-drop:empty::after {
  content: 'Drag letters here';
  color: #d8d8d8;
  font-style: italic;
  font-size: 16px;
}

.expert-letter-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.expert-letter-tile {
  padding: 14px 18px;
  background: #ece6fd;
  color: #262626;
  border: none;
  border-bottom: 5px solid #a185eb;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 600;
  cursor: move;
  user-select: none;
  transition: all 0.2s ease;
}

.expert-letter-tile:hover {
  transform: translateY(-2px);
}

.expert-letter-tile:active {
  transform: translateY(0);
}

.expert-letter-tile.dragging {
  opacity: 0.5;
}

.expert-letter-tile.shift-right {
  transform: translateX(60px);
}

/* Sentence drag area */
.expert-sentence-drop {
  min-height: 50px;
  border: 2px dashed #bfbfbf;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  justify-content: flex-start;
  background: #f5f0ec;
}

.expert-sentence-drop:empty::after {
  content: 'Drag words here';
  color: #bfbfbf;
  font-style: italic;
}

.expert-sentence-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.expert-sentence-tile {
  background: #ece6fd;
  color: #262626;
  border: none;
  border-bottom: 5px solid #a185eb;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: move;
  user-select: none;
  width: auto !important;
  height: 52px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 20px !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  vertical-align: middle !important;
  word-wrap: break-word !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  transition: all 0.2s ease;
}

.expert-sentence-tile:hover {
  transform: translateY(-2px);
}

.expert-sentence-tile:active {
  transform: translateY(0);
}

.expert-sentence-tile.dragging {
  opacity: 0.5;
}

/* Check Its Use */
.check-use-card {
  border: 2px solid #bfbfbf;
  border-radius: 12px;
  padding: 30px;
  margin: 20px auto;
  width: 60%;
  max-width: 700px;
  background: #fff;
}

@media (max-width: 768px) {
  .check-use-card { width: 90%; padding: 20px; }
}

.check-use-card h2 {
  margin-bottom: 20px;
  font-size: 22px;
  color: #262626;
}

.check-use-card p {
  font-size: 18px;
  margin: 20px 0;
  padding: 15px;
  background: #ece6fd;
  border-left: 4px solid #80089d;
  border-radius: 4px;
  line-height: 1.6;
}

.check-use-options {
  margin: 30px 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* See It, Call It */
.see-it-word {
  font-size: 64px;
  font-weight: bold;
  margin: 30px 0 20px;
  color: #262626;
  letter-spacing: 2px;
}

.see-it-controls {
  margin: 30px 0;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Know Its Many Meanings */
.meanings-word {
  font-size: 48px;
  font-weight: bold;
  margin: 20px auto;
  color: #80089d;
  letter-spacing: 1px;
  text-align: center;
}

.meanings-sentence {
  display: block;
  margin: 15px auto;
  padding: 15px 20px;
  font-size: 18px;
  width: 60%;
  max-width: 700px;
  border: none;
  border-bottom: 5px solid #a185eb;
  border-radius: 12px;
  cursor: pointer;
  background: #ece6fd;
  color: #262626;
  font-weight: 600;
  transition: all 0.2s ease;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .meanings-sentence { width: 90%; font-size: 16px; }
}

.meanings-sentence:hover:not(.meanings-locked) {
  transform: translateY(-2px);
}

.meanings-sentence.meanings-selected {
  background: #80089d;
  color: #fff;
  border-bottom-color: #5a0070;
}

.meanings-sentence.meanings-correct {
  background: #c1f2dc;
  border: none;
  border-bottom: 5px solid #00ca72;
  color: #2d633d;
}

.meanings-sentence.meanings-incorrect {
  background: #ffebee;
  border: none;
  border-bottom: 5px solid #f44336;
  color: #c62828;
}

.meanings-sentence.meanings-faded { opacity: 0.5; }
.meanings-sentence.meanings-locked { cursor: default; }

/* Dashboard */
/* Filter Controls */
.filter-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px auto 10px;
  flex-wrap: wrap;
}

.filter-btn {
  font-size: 16px;
  padding: 10px 20px;
  margin: 0;
  background: #d8d8d8;
  color: #6b6b6b;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: #c8c8c8;
}

.filter-btn-active {
  background: #80089d;
  color: #fff;
}

.filter-btn-active:hover {
  background: #9a1ab8;
}

.dashboard-grid {
  list-style: none;
  padding: 0;
  margin: 30px auto;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

.dashboard-grid li {
  margin: 0;
}

.dashboard-grid#explorationsGrid li {
  grid-column: span 1;
}

.dashboard-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-decoration: none;
  border: none;
  border-radius: 20px;
  background: #fff;
  color: #262626;
  min-height: 180px;
  min-width: 240px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dashboard-grid a:hover {
  background: #80089d;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.dashboard-emoji {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.dashboard-title {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  line-height: 1.3;
}

/* Next Lesson Button */
.next-lesson-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: bold;
  background: #80089d;
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  z-index: 1500;
  transform: translateX(200px);
  opacity: 0;
  transition: all 0.5s ease;
  margin: 0;
}

.next-lesson-btn-visible {
  transform: translateX(0);
  opacity: 1;
}

.next-lesson-btn:hover {
  background: #9a1ab8;
  transform: translateX(0) translateY(-2px);
}

/* Navigation Drawer */
.nav-hamburger {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  background: #262626;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 0;
  transition: all 0.3s;
}

.nav-hamburger:hover {
  background: #4a4a4a;
}

.nav-hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

.nav-hamburger.nav-hamburger-active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-hamburger.nav-hamburger-active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.nav-hamburger-active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100vh;
  background: #262626;
  color: #fff;
  z-index: 1999;
  transition: left 0.3s ease-in-out;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(38, 38, 38, 0.3);
}

.nav-drawer.nav-drawer-open {
  left: 0;
}

.nav-drawer-content {
  padding: 80px 20px 20px;
}

.nav-drawer-title {
  color: #00ca72;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 20px 0 10px;
  padding: 0 10px;
  font-weight: bold;
  text-align: left;
}

.nav-drawer-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.nav-drawer-list li {
  margin: 0;
}

.nav-drawer-list a {
  display: flex;
  align-items: center;
  padding: 12px 10px;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
  font-size: 16px;
  line-height: 1.3;
  text-align: left;
}

.nav-drawer-list a:hover {
  background: #4a4a4a;
}

.nav-emoji {
  font-size: 24px;
  margin-right: 12px;
  flex-shrink: 0;
  display: inline-block;
  width: 32px;
  text-align: center;
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(38, 38, 38, 0.95);
  z-index: 1998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-overlay.nav-overlay-active {
  opacity: 1;
  pointer-events: all;
}

.nav-centered-links {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.nav-link-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 80px;
  background: #fff;
  border-radius: 20px;
  text-decoration: none;
  color: #262626;
  transition: all 0.3s;
  width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav-link-large:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  background: #80089d;
  color: #fff;
}

.nav-emoji-large {
  font-size: 64px;
  line-height: 1;
}

.nav-link-text {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
}

.nav-drawer-home {
  display: flex;
  align-items: center;
  padding: 15px 10px;
  margin-bottom: 20px;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  background: #4a4a4a;
  transition: background 0.2s;
  font-size: 18px;
  font-weight: bold;
  border: 2px solid #bfbfbf;
}

.nav-drawer-home:hover {
  background: #80089d;
  border-color: #a185eb;
}

.nav-drawer-home .nav-emoji {
  font-size: 28px;
}

/* Left Drawer Navigation (Regular Mode) */
.nav-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100%;
  background: #262626;
  z-index: 10001;
  overflow-y: auto;
  transition: left 0.3s ease;
  box-shadow: 2px 0 8px rgba(0,0,0,0.3);
}

.nav-drawer.nav-drawer-active {
  left: 0;
}

.nav-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-drawer-overlay.nav-drawer-overlay-active {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-drawer-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  background: #00CA72;
  color: #262626;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s;
  gap: 4px;
}

.nav-drawer-button:hover {
  background: #009954;
}

.nav-drawer-button span:first-child {
  font-size: 24px;
}

.nav-drawer-section {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-drawer-section-title {
  padding: 8px 16px;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-drawer-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: white;
  text-decoration: none;
  transition: background 0.2s;
  height: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-drawer-item:hover {
  background: rgba(255,255,255,0.1);
}

.nav-drawer-icon {
  font-size: 18px;
  width: 28px;
  flex-shrink: 0;
}

.nav-drawer-text {
  font-size: 14px;
  font-weight: 500;
}

/* Sequence Activity */
.sequence-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 600px;
  max-width: 90%;
  margin: 20px auto;
}

.sequence-tile {
  padding: 12px;
  border: 2px solid #262626;
  border-radius: 8px;
  background-color: #ece6fd;
  color: #262626;
  cursor: grab;
  width: 100%;
  text-align: center;
  transition: margin 0.2s ease;
  user-select: none;
}

.sequence-placeholder {
  height: 40px;
  border: 2px dashed #bfbfbf;
  border-radius: 8px;
  margin: 5px 0;
}

/* Column Matching Activity */
.match-container {
  display: flex;
  justify-content: center;
  gap: 60px;
  align-items: flex-start;
  position: relative;
  margin: 20px auto;
  max-width: 800px;
}

.match-container .column {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 120px;
}

.match-container .match-card {
  min-width: 140px;
  min-height: 85px;
  padding: 15px 20px;
  border: none;
  border-bottom: 5px solid #a185eb;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  position: relative;
  background: #ece6fd;
  color: #262626;
  user-select: none;
  z-index: 2;
  transition: all 0.2s ease;
}

.match-container .match-card:hover {
  transform: translateY(-2px);
}

.match-container .match-card.selected {
  background: #80089d;
  color: #fff;
  border-bottom-color: #5a0070;
}

.match-container .match-card.inactive {
  pointer-events: none;
  opacity: 0.5;
}

.match-container .right .match-card img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

/* Make emoji text larger in right column with reduced padding */
.match-container .right .match-card.match-card-emoji {
  font-size: 40px;
  padding: 8px 20px;
}

.match-container svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Confetti Animation */
.confetti {
  position: fixed;
  width: 12px;
  height: 12px;
  top: -20px;
  z-index: 999;
  pointer-events: none;
  animation: fall linear forwards;
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Spot the Mistake Activity */
.mistake-sentence {
  margin: 20px auto;
  font-size: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 600px;
}

.mistake-word {
  padding: 10px 20px;
  border: none;
  border-bottom: 5px solid #a185eb;
  border-radius: 12px;
  background: #ece6fd;
  color: #262626;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.mistake-word.selected {
  background: #80089d;
  color: #fff;
  border-bottom-color: #5a0070;
  transform: translateY(-2px);
}

.mistake-word.correct {
  background: #c1f2dc;
  border: none;
  border-bottom: 5px solid #00ca72;
  color: #2d633d;
}

.mistake-word.incorrect {
  background: #ffebee;
  border: none;
  border-bottom: 5px solid #f44336;
  color: #c62828;
}