/* ===== EMOJI ORDER MEMORY ===== */

/* -- Length selector row -- */
.eo-len-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* -- Custom length control -- */
.eo-custom-ctrl {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 1rem;
  color: var(--text-muted);
}
.eo-custom-ctrl.visible { display: flex; }
.eo-custom-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  min-width: 36px;
  text-align: center;
}
.eo-custom-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1.2rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eo-custom-btn:active { background: var(--border); }

/* -- Flash stage -- */
.eo-flash-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.eo-flash-emoji {
  font-size: 5rem;
  line-height: 1;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.12s ease, transform 0.12s ease;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eo-flash-emoji.show {
  opacity: 1;
  transform: scale(1);
}

.eo-progress-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
  min-height: 22px;
  text-align: center;
}

/* Progress dots */
.eo-dots {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
  min-height: 16px;
}
.eo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
}
.eo-dot.done { background: var(--accent); }
.eo-dot.active {
  background: #fff;
  box-shadow: 0 0 6px #fff;
}

/* -- Answer grid -- */
.eo-answer-stage {
  display: none;
}
.eo-answer-stage.visible {
  display: block;
}

.eo-answer-hint {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.eo-answer-hint span {
  color: var(--accent);
  font-weight: 700;
}

.eo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 360px;
  margin: 0 auto;
}

.eo-emoji-btn {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  font-size: 2rem;
  line-height: 1;
  padding: 10px 4px;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s, background 0.15s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  user-select: none;
}
.eo-emoji-btn:active:not(:disabled) {
  transform: scale(0.92);
}
.eo-emoji-btn.selected {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb, 99, 179, 237), 0.15);
}
.eo-emoji-btn .eo-order-badge {
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.eo-emoji-btn.correct {
  border-color: #68d391;
  background: rgba(104, 211, 145, 0.2);
  animation: eo-bounce 0.3s ease;
}
.eo-emoji-btn.wrong {
  border-color: var(--secondary);
  background: rgba(252, 129, 129, 0.2);
  animation: eo-shake 0.35s ease;
}
.eo-emoji-btn:disabled {
  cursor: default;
  opacity: 0.5;
}

/* -- Flash end message -- */
.eo-message {
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  min-height: 24px;
  margin: 6px 0;
}

@keyframes eo-bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  70%  { transform: scale(0.94); }
  100% { transform: scale(1); }
}

@keyframes eo-shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
  100% { transform: translateX(0); }
}
