/* EduPlay Gamification Layer — XP, achievements, daily, wheel, combo */

.eg-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 10px 0 4px;
  font-family: "Nunito", system-ui, sans-serif;
}
.eg-pill {
  background: #fff;
  border: 2px solid #d8e5dd;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #1b4332;
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.06);
}
.eg-xp-wrap {
  margin: 10px 0 14px;
  text-align: left;
  font-family: "Nunito", system-ui, sans-serif;
}
.eg-xp-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 800;
  color: #1b4332;
  margin-bottom: 4px;
}
.eg-xp-bar {
  height: 12px;
  background: #e8f5e9;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #c8e6c9;
}
.eg-xp-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #52b788, #2d6a4f);
  border-radius: 999px;
  transition: width 0.45s ease;
}
.eg-daily {
  background: linear-gradient(135deg, #fff8e1, #e0f7fa);
  border: 2px solid #ffe082;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 12px 0;
  text-align: left;
  font-family: "Nunito", system-ui, sans-serif;
}
.eg-daily h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: #e65100;
}
.eg-daily p {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #37474f;
}
.eg-daily .eg-reward {
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #2d6a4f;
}
.eg-daily.is-done {
  border-color: #81c784;
  background: linear-gradient(135deg, #e8f5e9, #e0f2f1);
}
.eg-combo {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%) scale(0.6);
  z-index: 9600;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  color: #e65100;
  text-shadow: 0 3px 0 #fff, 0 6px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.eg-combo.show {
  opacity: 1;
  transform: translateX(-50%) scale(1.15);
}
.eg-combo.ultra {
  font-size: 1.9rem;
  color: #c62828;
}

.eg-toast-ach {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9700;
  max-width: 280px;
  background: #1b4332;
  color: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  font-family: "Nunito", system-ui, sans-serif;
  animation: eg-slide 0.35s ease;
}
@keyframes eg-slide {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.eg-toast-ach strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.eg-toast-ach span {
  font-size: 0.82rem;
  opacity: 0.9;
}

.eg-result-panel {
  margin-top: 14px;
  text-align: left;
  font-family: "Nunito", system-ui, sans-serif;
}
.eg-result-panel h3 {
  margin: 12px 0 8px;
  font-size: 1rem;
  color: #1b4332;
}
.eg-ach-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.eg-ach-item {
  background: #f7fbf8;
  border: 1px solid #d8e5dd;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 700;
}
.eg-ach-item.new {
  border-color: #e9c46a;
  background: #fffde7;
}
.eg-ency {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.eg-ency-card {
  border-radius: 12px;
  padding: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  border: 2px solid #d8e5dd;
  background: #fafafa;
  color: #9e9e9e;
}
.eg-ency-card.on {
  border-color: #52b788;
  background: #e8f5e9;
  color: #1b4332;
}

/* Lucky wheel modal */
.eg-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(8, 28, 21, 0.55);
  z-index: 9800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.eg-modal {
  background: #fff;
  border-radius: 22px;
  padding: 20px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  font-family: "Nunito", system-ui, sans-serif;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.eg-modal h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: #1b4332;
}
.eg-wheel {
  width: 220px;
  height: 220px;
  margin: 12px auto;
  border-radius: 50%;
  border: 6px solid #2d6a4f;
  background: conic-gradient(
    #e76f51 0 25%,
    #e9c46a 25% 50%,
    #2a9d8f 50% 75%,
    #52b788 75% 100%
  );
  transition: transform 3.2s cubic-bezier(0.15, 0.85, 0.25, 1);
  position: relative;
  box-shadow: inset 0 0 0 4px #fff, 0 8px 24px rgba(0, 0, 0, 0.15);
}
.eg-wheel-pointer {
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid #e76f51;
  margin: 0 auto -6px;
}
.eg-wheel-result {
  min-height: 2.4em;
  font-weight: 800;
  color: #2d6a4f;
  margin: 8px 0;
}
.eg-modal button {
  border: none;
  background: linear-gradient(135deg, #40916c, #2d6a4f);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  margin: 4px;
}
.eg-modal button:disabled {
  opacity: 0.55;
  cursor: default;
}
.eg-modal button.secondary {
  background: #fff;
  color: #1b4332;
  border: 2px solid #d8e5dd;
}

.eg-talk {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #264653;
  min-height: 1.3em;
}

body.eg-shake {
  animation: eg-shake 0.45s ease;
}
@keyframes eg-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

/* Category living backgrounds */
body.eg-bg-tenaga {
  background: linear-gradient(180deg, #fff8e1 0%, #ffe0b2 45%, #ffcc80 100%) !important;
}
body.eg-bg-cuaca {
  background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%) !important;
}
body.eg-bg-mukabumi {
  background: linear-gradient(180deg, #efebe9 0%, #d7ccc8 50%, #bcaaa4 100%) !important;
}
body.eg-bg-alam {
  background: linear-gradient(180deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%) !important;
}
.eg-bg-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.eg-bg-fx span {
  position: absolute;
  font-size: 1.6rem;
  opacity: 0.35;
  animation: eg-float 12s linear infinite;
}
@keyframes eg-float {
  0% {
    transform: translateY(110vh) rotate(0deg);
  }
  100% {
    transform: translateY(-20vh) rotate(360deg);
  }
}
main.app {
  position: relative;
  z-index: 1;
}

/* Memory / revision banner */
.eg-memory {
  background: linear-gradient(135deg, #fce4ec, #e8eaf6);
  border: 2px solid #f48fb1;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 10px 0;
  text-align: left;
  font-family: "Nunito", system-ui, sans-serif;
}
.eg-memory h4 {
  margin: 0 0 4px;
  color: #ad1457;
  font-size: 0.95rem;
}
.eg-memory p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a148c;
}
.eg-memory button {
  margin-top: 8px;
  border: none;
  background: #c2185b;
  color: #fff;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}

/* Boss banner */
.eg-boss {
  display: none;
  background: linear-gradient(135deg, #3e2723, #bf360c);
  color: #fff;
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 10px;
  text-align: center;
  font-weight: 900;
  font-family: "Nunito", system-ui, sans-serif;
  box-shadow: 0 8px 20px rgba(191, 54, 12, 0.35);
  animation: eg-boss-pulse 1.2s ease infinite alternate;
}
.eg-boss.show {
  display: block;
}
@keyframes eg-boss-pulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.02);
  }
}

/* Story mode + tutor cards */
.eg-story-card,
.eg-tutor {
  border-radius: 16px;
  padding: 12px 14px;
  margin: 10px 0;
  text-align: left;
  font-family: "Nunito", system-ui, sans-serif;
}
.eg-story-card {
  background: linear-gradient(135deg, #e8f5e9, #fff8e1);
  border: 2px solid #81c784;
}
.eg-tutor {
  background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
  border: 2px solid #90caf9;
}
.eg-story-card h4,
.eg-tutor h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}
.eg-story-card h4 {
  color: #2e7d32;
}
.eg-tutor h4 {
  color: #1565c0;
}
.eg-story-card p,
.eg-tutor p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #37474f;
}
.eg-story-card button,
.eg-tutor button {
  margin-top: 8px;
  border: none;
  color: #fff;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.eg-story-card button {
  background: #2e7d32;
}
.eg-tutor button {
  background: #1565c0;
}
.eg-story-map {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 10px 0 4px;
}
.eg-map-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  padding: 6px;
  border-radius: 12px;
  background: #fafafa;
  border: 2px solid #e0e0e0;
  opacity: 0.55;
}
.eg-map-node.done {
  opacity: 1;
  border-color: #66bb6a;
  background: #e8f5e9;
}
.eg-map-node.current {
  opacity: 1;
  border-color: #ffa726;
  background: #fff8e1;
  box-shadow: 0 0 0 3px rgba(255, 167, 38, 0.25);
  animation: eg-boss-pulse 1s ease infinite alternate;
}
.eg-map-icon {
  font-size: 1.3rem;
  line-height: 1.2;
}
.eg-map-node small {
  font-size: 0.65rem;
  font-weight: 800;
  color: #455a64;
}
.eg-map-arrow {
  color: #9e9e9e;
  font-weight: 900;
  font-size: 0.9rem;
}
.eg-story-banner {
  display: none;
  background: linear-gradient(135deg, #1b5e20, #43a047);
  color: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 10px;
  text-align: center;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(27, 94, 32, 0.3);
}
.eg-story-banner.show {
  display: block;
}
.eg-story-banner .eg-story-place {
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.eg-story-banner p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.95;
}
.eg-mode-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 10px 0 4px;
}
.eg-mode-btns .btn {
  flex: 1 1 140px;
}

/* Pet companion */
.eg-pet {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(135deg, #fff3e0, #fce4ec);
  border: 2px solid #ffab91;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 10px 0;
  font-family: "Nunito", system-ui, sans-serif;
  text-align: left;
}
.eg-pet-face {
  font-size: 2.6rem;
  line-height: 1;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 18px;
  border: 2px solid #ffccbc;
  flex-shrink: 0;
}
.eg-pet-face.mood-happy {
  animation: eg-mascot-bounce 1.2s ease infinite;
}
.eg-pet-face.mood-sad {
  filter: grayscale(0.35);
  opacity: 0.9;
}
.eg-pet-info {
  flex: 1;
  min-width: 0;
}
.eg-pet-info h4 {
  margin: 0 0 2px;
  color: #e65100;
  font-size: 0.95rem;
}
.eg-pet-info p {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #5d4037;
}
.eg-pet-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.eg-pet-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 6px;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #6d4c41;
}
.eg-xp-fill.eg-hap {
  background: linear-gradient(90deg, #f48fb1, #ec407a);
}
#eg-feed-btn {
  margin-top: 8px;
  border: none;
  background: #ef6c00;
  color: #fff;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}
#eg-feed-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Malaysia progress map */
.eg-my-map {
  background: linear-gradient(135deg, #e0f7fa, #e8eaf6);
  border: 2px solid #4dd0e1;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 10px 0;
  font-family: "Nunito", system-ui, sans-serif;
  text-align: left;
}
.eg-my-map h4 {
  margin: 0 0 8px;
  color: #00695c;
  font-size: 0.95rem;
}
.eg-region-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
@media (min-width: 480px) {
  .eg-region-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.eg-region {
  background: #fafafa;
  border: 2px solid #cfd8dc;
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
  opacity: 0.5;
  filter: grayscale(0.6);
}
.eg-region.on {
  opacity: 1;
  filter: none;
  border-color: #26a69a;
  background: #e0f2f1;
}
.eg-region-icon {
  display: block;
  font-size: 1.35rem;
  line-height: 1.2;
}
.eg-region small {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  color: #37474f;
  margin-top: 2px;
}
.eg-region-hint {
  display: block;
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 700;
  color: #90a4ae;
  margin-top: 2px;
}

/* Mini games card */
.eg-mini-card {
  background: linear-gradient(135deg, #f3e5f5, #e8eaf6);
  border: 2px solid #ce93d8;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 10px 0;
  font-family: "Nunito", system-ui, sans-serif;
  text-align: left;
}
.eg-mini-card h4 {
  margin: 0 0 4px;
  color: #6a1b9a;
  font-size: 0.95rem;
}
.eg-mini-card p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a148c;
}
.eg-mini-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.eg-mini-btns button {
  flex: 1 1 120px;
  border: none;
  background: #7b1fa2;
  color: #fff;
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}

/* Mini game boards */
.eg-match-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.eg-match-col h5 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #1b4332;
}
.eg-match-item {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  border: 2px solid #d8e5dd;
  background: #fff;
  border-radius: 12px;
  padding: 10px 8px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.85rem;
  color: #2d3436;
}
.eg-match-item.selected {
  border-color: #2d6a4f;
  background: #e8f5e9;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.2);
}
.eg-match-item.matched {
  opacity: 0.45;
  pointer-events: none;
  background: #c8e6c9;
  border-color: #81c784;
}
.eg-match-item.wrong-flash {
  border-color: #e57373;
  background: #ffebee;
  animation: eg-shake 0.35s ease;
}
.eg-memory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}
@media (min-width: 420px) {
  .eg-memory-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.eg-mem-card {
  aspect-ratio: 1;
  border: none;
  border-radius: 14px;
  background: linear-gradient(145deg, #5c6bc0, #3949ab);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 0 #283593;
  transition: transform 0.15s ease;
}
.eg-mem-card:active {
  transform: translateY(2px);
}
.eg-mem-card.flipped,
.eg-mem-card.done {
  background: #fff;
  color: #1b4332;
  border: 2px solid #c5cae9;
  box-shadow: none;
  font-size: 0.72rem;
  padding: 4px;
  line-height: 1.15;
}
.eg-mem-card.done {
  opacity: 0.55;
  pointer-events: none;
  background: #e8f5e9;
  border-color: #81c784;
}
.eg-mini-status {
  font-weight: 800;
  color: #37474f;
  min-height: 1.4em;
  margin: 6px 0;
  font-size: 0.9rem;
}

/* Global FAB + drawer (all games) */
#eg-fab {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9500;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, #ffd54f, #ffb300);
  color: #1b4332;
  font-weight: 900;
  font-size: 1.05rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-family: "Nunito", system-ui, sans-serif;
}
#eg-fab:active {
  transform: scale(0.95);
}
.eg-drawer {
  position: fixed;
  right: 12px;
  bottom: 78px;
  z-index: 9510;
  width: min(360px, calc(100vw - 24px));
  max-height: min(72vh, 560px);
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  border: 2px solid #d8e5dd;
  font-family: "Nunito", system-ui, sans-serif;
}
.eg-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #e8f0eb;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.eg-drawer-head strong {
  color: #1b4332;
  font-size: 1rem;
}
.eg-drawer-head button {
  border: none;
  background: #f5f5f5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 800;
}
.eg-drawer-body {
  padding: 8px 12px 12px;
}
.eg-drawer-foot {
  padding: 8px 12px 12px;
  border-top: 1px solid #e8f0eb;
  text-align: center;
  position: sticky;
  bottom: 0;
  background: #fff;
}
.eg-drawer-foot button {
  border: none;
  background: linear-gradient(135deg, #40916c, #2d6a4f);
  color: #fff;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
.eg-score-toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  z-index: 9600;
  background: #1b4332;
  color: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  font-family: "Nunito", system-ui, sans-serif;
  text-align: center;
  min-width: 200px;
}
.eg-score-toast strong {
  display: block;
  font-size: 1.15rem;
}
.eg-score-toast span {
  font-size: 0.85rem;
  opacity: 0.9;
}
.eg-score-toast button {
  margin-top: 8px;
  border: none;
  background: #ffd54f;
  color: #1b4332;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.eg-hub-panel {
  margin: 12px 0 16px;
}
.eg-overlay-bg {
  position: fixed;
  inset: 0;
  z-index: 9700;
  background: rgba(8, 28, 21, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.eg-overlay-card {
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  font-family: "Nunito", system-ui, sans-serif;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.eg-overlay-card h2 {
  margin: 0 0 6px;
  color: #1b4332;
  font-size: 1.25rem;
  text-align: center;
}
.eg-ov-close {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 2px solid #d8e5dd;
  background: #fff;
  color: #1b4332;
  font-weight: 800;
  padding: 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}

/* Drag & drop mini board */
.eg-drag-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}
.eg-drag-col h5 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #1b4332;
  text-align: center;
}
.eg-drag-item {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  border: 2px solid #d8e5dd;
  background: #fff;
  border-radius: 12px;
  padding: 12px 10px;
  font-weight: 800;
  font-family: inherit;
  cursor: grab;
  font-size: 0.88rem;
  color: #2d3436;
  text-align: center;
  user-select: none;
  touch-action: none;
}
.eg-drag-item.dragging,
.eg-drag-item.selected {
  border-color: #2d6a4f;
  background: #e8f5e9;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.2);
  cursor: grabbing;
}
.eg-drag-item.matched {
  opacity: 0.4;
  pointer-events: none;
  background: #c8e6c9;
  border-color: #81c784;
}
.eg-drop-zone {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  min-height: 48px;
  border: 2px dashed #90a4ae;
  background: #fafafa;
  border-radius: 12px;
  padding: 12px 10px;
  font-weight: 800;
  font-family: inherit;
  font-size: 0.88rem;
  color: #37474f;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.eg-drop-zone.over {
  border-color: #2d6a4f;
  background: #e8f5e9;
  border-style: solid;
}
.eg-drop-zone.matched {
  opacity: 0.55;
  pointer-events: none;
  border-style: solid;
  border-color: #81c784;
  background: #e8f5e9;
}
.eg-drop-zone.wrong-flash {
  border-color: #e57373;
  background: #ffebee;
  animation: eg-shake 0.35s ease;
}

/* Success / subject video overlay */
.eg-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 9900;
  background: rgba(8, 28, 21, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.eg-video-card {
  background: #fff;
  border-radius: 20px;
  padding: 14px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  font-family: "Nunito", system-ui, sans-serif;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.eg-video-card h3 {
  margin: 0 0 8px;
  color: #1b4332;
  font-size: 1.15rem;
}
.eg-video-card video {
  width: 100%;
  max-height: 50vh;
  border-radius: 14px;
  background: #000;
  display: block;
}
.eg-video-close {
  margin-top: 10px;
  border: none;
  background: linear-gradient(135deg, #40916c, #2d6a4f);
  color: #fff;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

/* Star burst */
.eg-burst {
  position: fixed;
  left: 50%;
  top: 40%;
  width: 0;
  height: 0;
  z-index: 9650;
  pointer-events: none;
}
.eg-burst i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffd54f;
  animation: eg-burst-out 0.7s ease-out forwards;
}
@keyframes eg-burst-out {
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.2);
  }
}

/* Mascot bounce */
.mascot.eg-bounce {
  animation: eg-mascot-bounce 0.55s ease;
}
@keyframes eg-mascot-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-14px) scale(1.12);
  }
  70% {
    transform: translateY(-4px) scale(1.05);
  }
}

/* Avatar unlock strip */
.eg-avatars {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}
.eg-av {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 2px solid #d8e5dd;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  opacity: 0.4;
  filter: grayscale(1);
}
.eg-av.on {
  opacity: 1;
  filter: none;
  border-color: #52b788;
  background: #e8f5e9;
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.15);
}
.eg-diff-pill {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: #e3f2fd;
  color: #1565c0;
}
