/* ════ LESSON OF DAY HOME CARD — COMPACT ROW ════ */

#lessonOfDayCard {
  margin: 0 0 12px;
}

.lod-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #7c5bf8, #4936e8, #a78bfa) border-box;
  border: 2px solid transparent;
  border-radius: 22px;
  padding: 14px 14px 14px 16px;
  color: var(--text);
  box-shadow: 0 4px 18px rgba(73,54,232,0.12), 0 2px 6px rgba(0,0,0,0.05);
  animation: todaySlide 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
  cursor: default;
}

.lod-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  width: 44px;
  text-align: center;
}

.lod-body {
  flex: 1;
  min-width: 0;
  direction: rtl;
}

.lod-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-soft);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.lod-title {
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-size: 1rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lod-btn {
  background: linear-gradient(135deg, #7c5bf8, #4936e8);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  font-family: inherit;
  padding: 10px 14px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(73,54,232,0.30);
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
  direction: rtl;
}

.lod-btn:hover  { transform: scale(1.04); }
.lod-btn:active { transform: scale(0.95); }
.lod-btn:disabled { opacity: 0.6; cursor: default; }

/* ════ CURRICULUM SCREEN ════ */

#sec-curriculum .sec-head,
#sec-session .sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
}

.curr-back-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.curr-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  flex: 1;
  text-align: center;
}

.curr-loading,
.curr-error,
.curr-empty {
  text-align: center;
  padding: 60px 20px;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
}

/* ── Track list ── */
.curr-track {
  margin: 16px 0 8px;
}

.curr-track-header {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.curr-units-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* ── Unit card ── */
.curr-unit-card {
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.curr-unit-card:active { transform: scale(0.96); }

.curr-unit-card.complete {
  border-color: rgba(251,191,36,0.6);
  background: rgba(251,191,36,0.12);
}

.curr-unit-card.locked {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.cu-emoji { font-size: 2.4rem; }

.cu-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.cu-dots {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.cu-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 0.2s;
}

.cu-dot.done { background: #a78bfa; }

.cu-progress {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
}

/* ── Unit day list ── */
.curr-back-to-tracks {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  margin: 14px 0 10px;
}

.curr-days-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 20px;
}

.curr-day-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: right;
  transition: transform 0.15s, opacity 0.15s;
  width: 100%;
}

.curr-day-card:active:not([disabled]) { transform: scale(0.98); }

.curr-day-card.done {
  border-color: rgba(167,139,250,0.5);
  background: rgba(167,139,250,0.1);
}

.curr-day-card.locked {
  opacity: 0.45;
  cursor: default;
}

.curr-day-card[disabled] { pointer-events: none; }

.cday-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.curr-day-card.done .cday-num {
  background: rgba(167,139,250,0.5);
}

.cday-info {
  flex: 1;
  text-align: right;
}

.cday-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.cday-type {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}

.cday-arrow {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
}

/* ════ SESSION PLAYER ════ */

#sec-session {
  background: linear-gradient(160deg, #3b0764 0%, #4936e8 55%, #6d28d9 100%);
  min-height: 100vh;
}

#sec-session .sec-head {
  background: transparent;
}

#sec-session .sec-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 14px 30px;
  position: relative;
}

.sp-container {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Progress dots */
.sp-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.sp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 0.3s, transform 0.2s;
}

.sp-dot.done { background: #a78bfa; }
.sp-dot.active {
  background: #fff;
  transform: scale(1.3);
}

.sp-step-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
}

/* Word card */
.sp-word-card {
  width: 100%;
  border-radius: 24px;
  padding: 32px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.2);
}

.sp-emoji {
  font-size: 5rem;
  line-height: 1;
  animation: sp-pop 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes sp-pop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.sp-en {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.sp-he {
  font-size: 1.2rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  direction: rtl;
}

.sp-speak-btn {
  margin-top: 4px;
  background: rgba(167,139,250,0.3);
  border: 1.5px solid rgba(167,139,250,0.5);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.15s;
}

.sp-speak-btn:active { transform: scale(0.9); }

/* Main action button */
.sp-main-btn {
  width: 100%;
  padding: 15px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 16px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.sp-main-btn:active { transform: scale(0.97); }

/* Game gate */
.sp-game-gate {
  width: 100%;
  border-radius: 24px;
  padding: 28px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
}

.sp-gate-emoji {
  font-size: 3.5rem;
}

.sp-gate-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.sp-gate-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.sp-chip {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
}

/* Reward screen */
.sp-reward {
  width: 100%;
  border-radius: 24px;
  padding: 36px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(251,191,36,0.4);
  text-align: center;
}

.sp-reward-stars {
  font-size: 2.5rem;
  animation: sp-pop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

.sp-reward-title {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.sp-reward-day {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  direction: rtl;
}

.sp-reward-xp {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251,191,36,0.15);
  border-radius: 12px;
  padding: 6px 18px;
}

/* ── Tap-to-reveal ── */
.sp-reveal-hidden {
  filter: blur(8px);
  cursor: pointer;
  transition: filter 0.35s ease;
  user-select: none;
}

.sp-text-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sp-text-hidden.sp-text-hidden { }
/* When class removed, opacity animates to 1 via transition */
:not(.sp-text-hidden).sp-en,
:not(.sp-text-hidden).sp-he,
:not(.sp-text-hidden).sp-speak-btn,
:not(.sp-text-hidden).sp-main-btn {
  opacity: 1;
  pointer-events: auto;
}

.sp-tap-hint {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  animation: sp-pulse 1.8s ease-in-out infinite;
}

@keyframes sp-pulse {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 1; }
}

/* ── Unit completion overlay ── */
.unit-complete-card {
  width: 100%;
  border-radius: 24px;
  padding: 36px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(251,191,36,0.5);
  text-align: center;
  animation: sp-pop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

.uco-emoji {
  font-size: 4.5rem;
  line-height: 1;
}

.uco-badge {
  font-size: 2.5rem;
  margin-top: -8px;
}

.uco-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  direction: rtl;
}

.uco-xp {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251,191,36,0.15);
  border-radius: 12px;
  padding: 6px 18px;
}

.uco-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  direction: rtl;
}

.uco-port-btn {
  background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
  color: #1a1a2e !important;
}

.uco-cont-btn {
  background: rgba(255,255,255,0.12) !important;
  border: 1.5px solid rgba(255,255,255,0.2) !important;
}

/* ── Curriculum learning streak chip ── */
.strip-learn {
  color: #93c5fd;
}

/* ── Words of the Day review screen ── */
.sp-review-heading {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  direction: rtl;
}

.sp-words-scroll {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
}

.sp-review-word {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  text-align: right;
}

.sp-review-word:active { transform: scale(0.97); background: rgba(255,255,255,0.18); }

.sp-rw-emoji { font-size: 1.8rem; flex-shrink: 0; }

.sp-rw-en {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  flex: 1;
  text-align: left;
}

.sp-rw-he {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  direction: rtl;
}

.sp-rw-icon {
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

/* ── Unit completion story button ── */
.uco-story-btn {
  background: linear-gradient(135deg, #0ea5e9, #6366f1) !important;
  color: #fff !important;
}

/* ── Premium-locked unit card ── */
.curr-unit-card.cu-premium-locked {
  opacity: 0.75;
  border-color: rgba(250,204,21,0.4) !important;
  position: relative;
}

.curr-unit-card.cu-premium-locked .cu-emoji {
  filter: grayscale(0.5);
}

.cu-crown {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 14px;
  line-height: 1;
}

.cu-premium-label {
  color: #facc15 !important;
  font-weight: 700;
  font-size: 11px;
}

/* ── Word Match activity ── */
.sp-match-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  direction: rtl;
  margin-bottom: 4px;
}

.sp-match-board {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.sp-match-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.sp-match-word {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.sp-match-word.selected {
  border-color: #818cf8;
  background: rgba(129,140,248,0.25);
  transform: scale(1.04);
}

.sp-match-word.matched,
.sp-match-emoji.matched {
  opacity: 0.4;
  border-color: #4ade80;
  background: rgba(74,222,128,0.15);
}

.sp-match-word.wrong,
.sp-match-emoji.wrong {
  border-color: #f87171;
  background: rgba(248,113,113,0.2);
}

.sp-match-emoji {
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  font-size: 2rem;
  padding: 8px;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
  text-align: center;
}

.sp-match-emoji:active,
.sp-match-word:active { transform: scale(0.96); }

.sp-match-progress {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  text-align: center;
  margin-top: 4px;
}

/* ── Foxy hint bubble ── */
.sp-foxy-hint {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30,20,60,0.92);
  border: 1.5px solid rgba(124,91,248,0.5);
  border-radius: 20px;
  padding: 10px 16px 10px 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 50;
  pointer-events: none;
  max-width: 92%;
}

.sp-foxy-hint.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sp-foxy-hint-fox {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sp-foxy-hint-text {
  font-size: 0.82rem;
  color: #e0d9ff;
  direction: rtl;
  font-weight: 600;
  line-height: 1.4;
}

/* ── Day stars in unit view ── */
.cday-stars {
  font-size: 11px;
  margin-right: 4px;
}

/* ── Mastery progress bar on unit cards ── */
.cu-mastery-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
  overflow: hidden;
  margin: 2px 0;
}

.cu-mastery-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  border-radius: 4px;
  transition: width 0.4s ease;
  min-width: 0;
}

.curr-unit-card.complete .cu-mastery-fill {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

/* ── Speak row (🔊 + 🎤 side by side) ── */
.sp-speak-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

/* ── Mic button ── */
.sp-mic-btn {
  background: rgba(52,211,153,0.2);
  border: 1.5px solid rgba(52,211,153,0.45);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sp-mic-btn.listening {
  background: rgba(52,211,153,0.5);
  border-color: #34d399;
  animation: sp-mic-pulse 0.7s ease-in-out infinite;
}

.sp-mic-btn.mic-success {
  background: rgba(74,222,128,0.4);
  border-color: #4ade80;
}

.sp-mic-btn.mic-fail {
  background: rgba(248,113,113,0.25);
  border-color: #f87171;
}

@keyframes sp-mic-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.12); box-shadow: 0 0 12px rgba(52,211,153,0.5); }
}
