/* ═══════════════════════════════════════
   ARENA (game play area)
═══════════════════════════════════════ */
.arena {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(18px, 4vw, 30px);
  box-shadow: var(--shadow-lg);
  display: none;
}

.arena.active {
  display: block;
  animation: sectionIn 0.35s var(--ease) both;
}

.arena-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.arena-score {
  background: var(--amber-light);
  border: 1.5px solid #fde68a;
  border-radius: 30px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 14px;
  color: #92400e;
}

.arena-q {
  font-size: clamp(60px, 14vw, 90px);
  text-align: center;
  margin-bottom: 6px;
  line-height: 1;
}

.arena-prompt {
  font-family: "Baloo 2", "Noto Sans Hebrew", "Sora", sans-serif;
  font-size: clamp(17px, 3.5vw, 24px);
  font-weight: 900;
  color: var(--text);
  text-align: center;
  margin-bottom: 3px;
}

.arena-heb {
  font-size: clamp(12px, 2vw, 14px);
  font-weight: 600;
  color: var(--text-soft);
  text-align: center;
  direction: rtl;
  margin-bottom: 20px;
}

.opts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 400px;
  margin: 0 auto 16px;
}

.opt {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 8px;
  font-family: "Baloo 2", "Noto Sans Hebrew", "Sora", sans-serif;
  font-weight: 900;
  font-size: clamp(24px, 5vw, 34px);
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s var(--ease);
  min-height: 56px;
}

.opt.word-opt {
  font-size: clamp(13px, 3vw, 16px);
  padding: 14px 10px;
}

.opt:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.04);
}

.opt.correct {
  background: #dcfce7 !important;
  border-color: #4ade80 !important;
  color: #16a34a !important;
  animation: popBounce 0.4s var(--spring);
}

.opt.wrong {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  animation: shake 0.45s var(--ease);
}

@keyframes popBounce {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-8px);
  }

  75% {
    transform: translateX(8px);
  }
}

/* SPELL */
.spell-slots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px auto;
  max-width: 480px;
}

.slot {
  width: clamp(42px, 9vw, 56px);
  height: clamp(50px, 10vw, 64px);
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Baloo 2", "Noto Sans Hebrew", "Sora", sans-serif;
  font-weight: 900;
  font-size: clamp(20px, 5vw, 30px);
  color: var(--text);
  transition: all 0.2s;
}

.slot.filled {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.slot.ok {
  background: #dcfce7;
  border-color: #4ade80;
  color: #16a34a;
}

.slot.hint {
  background: #fef9c3;
  border-color: #fbbf24;
  color: #92400e;
}

.bank {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto 14px;
}

.bkey {
  width: clamp(44px, 9vw, 54px);
  height: clamp(44px, 9vw, 54px);
  border-radius: var(--radius-sm);
  background: var(--primary);
  border: none;
  color: white;
  font-family: "Baloo 2", "Noto Sans Hebrew", "Sora", sans-serif;
  font-weight: 900;
  font-size: clamp(18px, 4vw, 24px);
  cursor: pointer;
  transition:
    transform 0.2s var(--spring),
    opacity 0.2s;
  box-shadow: 0 3px 10px rgba(108, 79, 246, 0.35);
}

.bkey:hover:not(:disabled) {
  transform: scale(1.12);
}

.bkey:disabled {
  opacity: 0.3;
  cursor: default;
  transform: scale(1);
}

/* MEMORY */
.mem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 460px;
  margin: 0 auto;
}

.mcard {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mcard.flipped,
.mcard.matched {
  transform: rotateY(180deg);
}

.mfront,
.mback {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
}

.mfront {
  background: linear-gradient(135deg, var(--primary), var(--coral));
  border: 2px solid transparent;
  font-size: clamp(20px, 4vw, 26px);
}

.mback {
  background: var(--surface);
  border: 2px solid var(--border);
  transform: rotateY(180deg);
  font-family: "Baloo 2", "Noto Sans Hebrew", "Sora", sans-serif;
  font-weight: 900;
  font-size: clamp(20px, 5vw, 30px);
  color: var(--primary);
}

.mcard.matched .mback {
  background: #dcfce7;
  border-color: #4ade80;
  color: #16a34a;
}

/* LISTEN & PICK */
.lp-speaker-container {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

.lp-speaker {
  width: clamp(80px, 18vw, 110px);
  height: clamp(80px, 18vw, 110px);
  border-radius: 50%;
  background: var(--primary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(73, 54, 232, 0.3);
  transition: all 0.25s var(--spring);
}

.lp-speaker:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(73, 54, 232, 0.4);
}

.lp-speaker:active {
  transform: scale(0.92);
}

.lp-speaker svg {
  width: 45%;
  height: 45%;
}

.lp-speaker.speaking {
  animation: speakerPulse 0.5s infinite alternate var(--ease);
}

@keyframes speakerPulse {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

