/* ═══════════════════════════════════════════════════════════════════════════════
   modules.css  — Shared styles for all EducaPalavras learning modules
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Module page header ───────────────────────────────────────────────────────── */
.mod-page-header {
  margin-bottom: 1.5rem;
}
.mod-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  display: block;
  margin-bottom: 0.2rem;
}
.mod-title {
  font-family: "Baloo 2", cursive;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.3rem;
  color: inherit;
}
.mod-subtitle {
  font-size: 0.95rem;
  opacity: 0.75;
  margin-bottom: 0;
}

/* ── Feedback toast ───────────────────────────────────────────────────────────── */
#mod-feedback {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(3rem);
  background: rgba(255,255,255,0.95);
  color: #1a1a2e;
  font-family: "Baloo 2", cursive;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.65rem 1.5rem;
  border-radius: 2rem;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
  white-space: nowrap;
}
#mod-feedback.mod-feedback-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Category filter bar ──────────────────────────────────────────────────────── */
.mod-cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.mod-cat-btn {
  border: none;
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  font-family: "Baloo 2", cursive;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75);
  transition: background 0.18s, color 0.18s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mod-cat-btn:hover { background: rgba(255,255,255,0.22); color: #fff; }
.mod-cat-btn:active { transform: scale(0.95); }
.mod-cat-btn.mod-cat-active {
  background: var(--cat-color, rgba(255,255,255,0.9));
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

/* ── Generic card grid ────────────────────────────────────────────────────────── */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}
.mod-grid-lg {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.mod-grid-sm {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

/* ── Generic card ─────────────────────────────────────────────────────────────── */
.mod-card {
  background: var(--card-bg, rgba(255,255,255,0.1));
  border: none;
  border-radius: 1.25rem;
  padding: 1.1rem 0.75rem 0.9rem;
  cursor: pointer;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.mod-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.18s;
  border-radius: inherit;
  pointer-events: none;
}
.mod-card:hover {
  transform: translateY(-5px) scale(1.04);
  box-shadow: 0 16px 36px rgba(0,0,0,0.35);
}
.mod-card:hover::before { background: rgba(255,255,255,0.06); }
.mod-card:active { transform: scale(0.96); }
.mod-card.mod-active {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(255,255,255,0.35), 0 12px 32px rgba(0,0,0,0.3);
  transform: scale(1.05);
  filter: brightness(1.15);
  z-index: 5;
}

.mod-card-emoji {
  font-size: 2.4rem;
  line-height: 1;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.mod-card-name {
  font-family: "Baloo 2", cursive;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}
.mod-card-sub {
  font-size: 0.7rem;
  opacity: 0.82;
  line-height: 1.3;
}
.mod-card-desc {
  font-size: 0.72rem;
  opacity: 0.75;
  line-height: 1.3;
}

/* ── Bounce animation ─────────────────────────────────────────────────────────── */
@keyframes mod-bounce {
  0%,100% { transform: translateY(0) scale(1); }
  30%      { transform: translateY(-12px) scale(1.08); }
  60%      { transform: translateY(-4px) scale(1.03); }
  80%      { transform: translateY(-7px) scale(1.05); }
}
.mod-bounce { animation: mod-bounce 0.55s ease both; }

/* ── Alphabet ─────────────────────────────────────────────────────────────────── */
.alpha-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 0.85rem;
}
.letter-card {
  background: var(--card-bg, rgba(255,255,255,0.12));
  border: none;
  border-radius: 1.2rem;
  padding: 1rem 0.5rem 0.8rem;
  cursor: pointer;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.letter-card:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 14px 30px rgba(0,0,0,0.3); }
.letter-card:active { transform: scale(0.95); }
.letter-card.mod-active {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(255,255,255,0.3), 0 12px 28px rgba(0,0,0,0.3);
  filter: brightness(1.2);
}
.letter-card.vowel { --card-bg: rgba(255, 152, 0, 0.35); }
.letter-card.consonant { --card-bg: rgba(52, 152, 219, 0.30); }
.letter-big {
  font-family: "Baloo 2", cursive;
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.letter-emoji { font-size: 1.6rem; line-height: 1; }
.letter-word {
  font-family: "Baloo 2", cursive;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.88;
}
.vowel-badge {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: rgba(255,152,0,0.7);
  color: #fff;
  padding: 0.1rem 0.35rem;
  border-radius: 0.5rem;
}

/* ── Numbers ──────────────────────────────────────────────────────────────────── */
.num-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}
.num-card {
  background: var(--num-bg, rgba(255,255,255,0.12));
  border: none;
  border-radius: 1.35rem;
  padding: 1.2rem 0.75rem 1rem;
  cursor: pointer;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 5px 18px rgba(0,0,0,0.22);
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.num-card:hover { transform: translateY(-6px) scale(1.05); box-shadow: 0 16px 36px rgba(0,0,0,0.3); }
.num-card:active { transform: scale(0.95); }
.num-card.mod-active {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(255,255,255,0.3), 0 14px 32px rgba(0,0,0,0.28);
  filter: brightness(1.2);
}
.num-big {
  font-family: "Baloo 2", cursive;
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 3px 10px rgba(0,0,0,0.35);
}
.num-word {
  font-family: "Baloo 2", cursive;
  font-size: 0.9rem;
  font-weight: 800;
  opacity: 0.9;
}
.num-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  max-width: 100px;
}
.num-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.num-emoji {
  font-size: 1.2rem;
  opacity: 0.85;
}

/* ── Colors ───────────────────────────────────────────────────────────────────── */
.colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}
.color-card {
  border: none;
  border-radius: 1.35rem;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  transition: transform 0.18s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
}
.color-card:hover { transform: translateY(-6px) scale(1.04); box-shadow: 0 18px 38px rgba(0,0,0,0.35); }
.color-card:active { transform: scale(0.96); }
.color-card.mod-active {
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgba(255,255,255,0.4), 0 14px 32px rgba(0,0,0,0.3);
  transform: scale(1.05);
}
.color-swatch {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--swatch-color, #eee);
}
.color-label {
  padding: 0.55rem 0.5rem 0.45rem;
  background: rgba(0,0,0,0.55);
  text-align: center;
}
.color-name {
  font-family: "Baloo 2", cursive;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  display: block;
}
.color-example {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.72);
  display: block;
}

/* ── Emotions ─────────────────────────────────────────────────────────────────── */
.emotions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 1rem;
}
.emotion-card {
  background: var(--em-bg, rgba(255,255,255,0.12));
  border: none;
  border-radius: 1.4rem;
  padding: 1.35rem 1rem 1.1rem;
  cursor: pointer;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 5px 18px rgba(0,0,0,0.22);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.emotion-card:hover { transform: translateY(-7px) scale(1.05); box-shadow: 0 18px 40px rgba(0,0,0,0.32); }
.emotion-card:active { transform: scale(0.95); }
.emotion-card.mod-active {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(255,255,255,0.35), 0 14px 34px rgba(0,0,0,0.28);
  filter: brightness(1.15);
}
.em-emoji { font-size: 3rem; line-height: 1; }
.em-name { font-family: "Baloo 2", cursive; font-size: 1.05rem; font-weight: 800; }
.em-desc { font-size: 0.74rem; opacity: 0.82; line-height: 1.35; }
.em-tip {
  font-size: 0.68rem;
  background: rgba(255,255,255,0.15);
  border-radius: 0.75rem;
  padding: 0.2rem 0.65rem;
  opacity: 0.88;
  line-height: 1.4;
}

/* ── Food groups ──────────────────────────────────────────────────────────────── */
.food-group-section {
  background: rgba(255,255,255,0.07);
  border-radius: 1.5rem;
  padding: 1.25rem 1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.food-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.food-group-icon {
  font-size: 2rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background: var(--fg-color, rgba(255,255,255,0.15));
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.food-group-title { font-family: "Baloo 2", cursive; font-size: 1.2rem; font-weight: 800; flex: 1; }
.food-group-desc  { font-size: 0.78rem; opacity: 0.72; }
.food-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.65rem;
}
.food-item-card {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 1rem;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  transition: transform 0.17s, box-shadow 0.17s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
  -webkit-tap-highlight-color: transparent;
}
.food-item-card:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 12px 26px rgba(0,0,0,0.25); }
.food-item-card:active { transform: scale(0.95); }
.food-item-card.mod-active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(255,255,255,0.3);
  filter: brightness(1.15);
}
.food-item-emoji { font-size: 2rem; line-height: 1; }
.food-item-name  { font-family: "Baloo 2", cursive; font-size: 0.75rem; font-weight: 700; }

/* ── Calendar ─────────────────────────────────────────────────────────────────── */
.cal-section-title {
  font-family: "Baloo 2", cursive;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.day-card {
  background: var(--day-bg, rgba(255,255,255,0.12));
  border: none;
  border-radius: 1.1rem;
  padding: 0.75rem 0.35rem;
  cursor: pointer;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  transition: transform 0.17s, box-shadow 0.17s;
  -webkit-tap-highlight-color: transparent;
}
.day-card:hover { transform: translateY(-4px) scale(1.06); box-shadow: 0 12px 24px rgba(0,0,0,0.28); }
.day-card:active { transform: scale(0.95); }
.day-card.mod-active { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(255,255,255,0.3); filter: brightness(1.2); }
.day-emoji { font-size: 1.35rem; }
.day-name  { font-family: "Baloo 2", cursive; font-size: 0.62rem; font-weight: 800; }

.months-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.month-card {
  background: var(--mo-bg, rgba(255,255,255,0.12));
  border: none;
  border-radius: 1.15rem;
  padding: 0.9rem 0.5rem;
  cursor: pointer;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 3px 12px rgba(0,0,0,0.2);
  transition: transform 0.17s, box-shadow 0.17s;
  -webkit-tap-highlight-color: transparent;
}
.month-card:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 12px 26px rgba(0,0,0,0.28); }
.month-card:active { transform: scale(0.95); }
.month-card.mod-active { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(255,255,255,0.28); filter: brightness(1.2); }
.month-emoji  { font-size: 1.6rem; }
.month-num   { font-family: "Baloo 2", cursive; font-size: 0.65rem; font-weight: 700; opacity: 0.7; }
.month-name  { font-family: "Baloo 2", cursive; font-size: 0.82rem; font-weight: 800; }

.seasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.season-card {
  background: var(--se-bg, rgba(255,255,255,0.12));
  border: none;
  border-radius: 1.5rem;
  padding: 1.4rem 1rem;
  cursor: pointer;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 5px 18px rgba(0,0,0,0.22);
  transition: transform 0.18s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.season-card:hover { transform: translateY(-6px) scale(1.04); box-shadow: 0 18px 38px rgba(0,0,0,0.32); }
.season-card:active { transform: scale(0.95); }
.season-card.mod-active { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(255,255,255,0.3); filter: brightness(1.15); }
.season-emoji  { font-size: 3rem; line-height: 1; }
.season-name   { font-family: "Baloo 2", cursive; font-size: 1.15rem; font-weight: 800; }
.season-months { font-size: 0.75rem; opacity: 0.75; }
.season-desc   { font-size: 0.8rem; opacity: 0.85; line-height: 1.35; }

/* ── Weather ──────────────────────────────────────────────────────────────────── */
.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.weather-card {
  background: var(--wx-bg, rgba(255,255,255,0.12));
  border: none;
  border-radius: 1.4rem;
  padding: 1.4rem 0.85rem 1.1rem;
  cursor: pointer;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 5px 18px rgba(0,0,0,0.22);
  transition: transform 0.18s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.weather-card:hover { transform: translateY(-6px) scale(1.05); box-shadow: 0 18px 38px rgba(0,0,0,0.32); }
.weather-card:active { transform: scale(0.95); }
.weather-card.mod-active { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(255,255,255,0.35); filter: brightness(1.15); }
.wx-emoji { font-size: 3.2rem; line-height: 1; }
.wx-name  { font-family: "Baloo 2", cursive; font-size: 1rem; font-weight: 800; }
.wx-desc  { font-size: 0.73rem; opacity: 0.82; line-height: 1.35; }

/* ── Home rooms ───────────────────────────────────────────────────────────────── */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
}
.room-card {
  background: var(--rm-bg, rgba(255,255,255,0.1));
  border: none;
  border-radius: 1.5rem;
  padding: 1.25rem;
  cursor: pointer;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 5px 18px rgba(0,0,0,0.22);
  transition: transform 0.18s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.room-card:hover { transform: translateY(-5px) scale(1.025); box-shadow: 0 16px 36px rgba(0,0,0,0.3); }
.room-card:active { transform: scale(0.97); }
.room-card.mod-active { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(255,255,255,0.3); }
.room-header { display: flex; align-items: center; gap: 0.75rem; }
.room-icon { font-size: 2.2rem; line-height: 1; }
.room-name { font-family: "Baloo 2", cursive; font-size: 1.1rem; font-weight: 800; }
.room-desc { font-size: 0.75rem; opacity: 0.72; }
.room-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.room-item-pill {
  background: rgba(255,255,255,0.14);
  border-radius: 1rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  border: none;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}
.room-item-pill:hover { background: rgba(255,255,255,0.25); }
.room-item-pill:active { transform: scale(0.93); }

/* ── Family ───────────────────────────────────────────────────────────────────── */
.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}
.family-card {
  background: var(--fam-bg, rgba(255,255,255,0.12));
  border: none;
  border-radius: 1.3rem;
  padding: 1.2rem 0.75rem 1rem;
  cursor: pointer;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 5px 16px rgba(0,0,0,0.22);
  transition: transform 0.18s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.family-card:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 16px 34px rgba(0,0,0,0.3); }
.family-card:active { transform: scale(0.95); }
.family-card.mod-active { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(255,255,255,0.32); filter: brightness(1.15); }
.fam-emoji { font-size: 2.6rem; line-height: 1; }
.fam-name  { font-family: "Baloo 2", cursive; font-size: 0.95rem; font-weight: 800; }
.fam-rel   { font-size: 0.68rem; opacity: 0.75; line-height: 1.3; }

/* ── Transport ────────────────────────────────────────────────────────────────── */
/* (reuses .mod-grid and .mod-card; extra transport-specific below) */
.transport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.9rem;
}
.transport-card {
  background: var(--tr-bg, rgba(255,255,255,0.12));
  border: none;
  border-radius: 1.25rem;
  padding: 1.1rem 0.65rem 0.9rem;
  cursor: pointer;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  transition: transform 0.18s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.transport-card:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 14px 30px rgba(0,0,0,0.3); }
.transport-card:active { transform: scale(0.95); }
.transport-card.mod-active { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(255,255,255,0.32); filter: brightness(1.15); }

/* ── Modules index page ───────────────────────────────────────────────────────── */
.modules-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.2rem;
}
.module-hub-card {
  background: var(--mh-bg, rgba(255,255,255,0.1));
  border: none;
  border-radius: 1.6rem;
  padding: 1.5rem 1.2rem 1.25rem;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  box-shadow: 0 6px 22px rgba(0,0,0,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.module-hub-card:hover {
  transform: translateY(-7px) scale(1.025);
  box-shadow: 0 20px 44px rgba(0,0,0,0.35);
  color: #fff;
  text-decoration: none;
}
.module-hub-card:active { transform: scale(0.97); }
.mh-icon { font-size: 2.8rem; line-height: 1; margin-bottom: 0.1rem; }
.mh-title { font-family: "Baloo 2", cursive; font-size: 1.1rem; font-weight: 800; line-height: 1.2; }
.mh-desc  { font-size: 0.75rem; opacity: 0.78; line-height: 1.4; }
.mh-badge {
  background: rgba(0,0,0,0.25);
  border-radius: 1rem;
  padding: 0.15rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ── Responsive tweaks ────────────────────────────────────────────────────────── */
@media (max-width: 576px) {
  .days-grid { grid-template-columns: repeat(7, 1fr); gap: 0.3rem; }
  .day-name  { font-size: 0.5rem; }
  .day-emoji { font-size: 1rem; }
  .alpha-grid { grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); }
  .letter-big { font-size: 2.2rem; }
  .modules-hub-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .seasons-grid { grid-template-columns: 1fr 1fr; }
  .rooms-grid { grid-template-columns: 1fr; }
  .food-items-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}
@media (max-width: 360px) {
  .alpha-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
  .num-grid   { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}


/* ═══════════════════════════════════════════════════════════════════════════
   Appended to modules.css — Numbers v2 redesign + Tabuada styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Numbers v2 grid ──────────────────────────────────────────────────────── */
.num-grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}

/* ── Number card v2 ───────────────────────────────────────────────────────── */
.num-card2 {
  background: var(--nc, rgba(255,255,255,0.15));
  border: none;
  border-radius: 1.5rem;
  padding: 1.1rem 0.65rem 1rem;
  cursor: pointer;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  box-shadow:
    0 6px 22px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
/* Sheen overlay */
.num-card2::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg,
    rgba(255,255,255,0.22) 0%,
    rgba(255,255,255,0.04) 55%,
    transparent 100%);
  pointer-events: none;
  border-radius: inherit;
}
.num-card2:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 18px 40px rgba(0,0,0,0.38),
              inset 0 1px 0 rgba(255,255,255,0.3);
  filter: brightness(1.12);
}
.num-card2:active  { transform: scale(0.95); }
.num-card2.nc-active {
  animation: nc-pop 0.48s ease both;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(255,255,255,0.35),
              0 18px 40px rgba(0,0,0,0.38);
}
@keyframes nc-pop {
  0%   { transform: scale(1); }
  28%  { transform: scale(1.18) rotate(-2deg); }
  55%  { transform: scale(1.06) rotate(1deg); }
  78%  { transform: scale(1.12) rotate(-1deg); }
  100% { transform: scale(1); }
}

/* Number digit */
.nc-number {
  font-family: "Baloo 2", cursive;
  font-size: 3.8rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 4px 14px rgba(0,0,0,0.45);
  letter-spacing: -0.02em;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

/* Ten-frame dot grid */
.nc-tenframe {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 22px;
}
.nc-row {
  display: flex;
  gap: 3px;
}
.nc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transition: transform 0.2s;
}
.nc-dot.filled {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.nc-dot.empty {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
}
.num-card2:hover .nc-dot.filled {
  transform: scale(1.2);
}

/* Word label */
.nc-word {
  font-family: "Baloo 2", cursive;
  font-size: 0.8rem;
  font-weight: 800;
  opacity: 0.92;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ── Tabuada — table selector ─────────────────────────────────────────────── */
.tab-selector-title {
  font-family: "Baloo 2", cursive;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1.1rem;
  opacity: 0.9;
}
.tab-selector-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  max-width: 540px;
}
.tab-select-btn {
  background: var(--tsb-color, #3498DB);
  border: none;
  border-radius: 1.35rem;
  padding: 1rem 0.5rem;
  cursor: pointer;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  box-shadow: 0 5px 18px rgba(0,0,0,0.28),
              inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.tab-select-btn:hover {
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 16px 36px rgba(0,0,0,0.35);
  filter: brightness(1.15);
}
.tab-select-btn:active { transform: scale(0.93); }
.tsb-x { font-size: 0.75rem; opacity: 0.75; }
.tsb-n { font-family: "Baloo 2", cursive; font-size: 2.2rem; font-weight: 900; line-height: 1; }

/* ── Tabuada — quiz area ──────────────────────────────────────────────────── */
.tab-quiz-area { max-width: 560px; margin: 0 auto; }
.tab-quiz-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.tab-quiz-title {
  font-family: "Baloo 2", cursive;
  font-size: 1.2rem;
  font-weight: 800;
  flex: 1;
}
.tab-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 130px;
}
.tab-progress-text { font-size: 0.75rem; font-weight: 700; opacity: 0.75; }
.tab-progress-bar-bg {
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  overflow: hidden;
}
.tab-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2ECC71, #1ABC9C);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Score row */
.tab-score-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.tab-score-badge {
  font-family: "Baloo 2", cursive;
  font-size: 1rem;
  font-weight: 800;
  padding: 0.3rem 1rem;
  border-radius: 2rem;
}
.tab-correct { background: rgba(46,204,113,0.25); color: #2ECC71; border: 1.5px solid #2ECC71; }
.tab-wrong   { background: rgba(231,76,60,0.22);  color: #E74C3C; border: 1.5px solid #E74C3C; }

/* Equation card */
.tab-equation-card {
  background: rgba(255,255,255,0.1);
  border-radius: 1.75rem;
  padding: 1.75rem 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.28),
              inset 0 1px 0 rgba(255,255,255,0.2);
  text-align: center;
}
.tab-equation-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.tab-eq-num {
  font-family: "Baloo 2", cursive;
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  text-shadow: 0 4px 14px rgba(0,0,0,0.4);
  min-width: 3rem;
  text-align: center;
}
.tab-eq-op {
  font-family: "Baloo 2", cursive;
  font-size: 2.8rem;
  font-weight: 900;
  opacity: 0.7;
  line-height: 1;
}

/* Drop zone */
.tab-dropzone {
  width: 90px;
  height: 78px;
  border: 3px dashed rgba(255,255,255,0.5);
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Baloo 2", cursive;
  font-size: 2.6rem;
  font-weight: 900;
  color: rgba(255,255,255,0.45);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  cursor: pointer;
}
.tab-dropzone.dz-hover {
  background: rgba(255,255,255,0.18);
  border-color: #fff;
  border-style: solid;
  transform: scale(1.06);
  color: #fff;
}
.tab-dropzone.dz-correct {
  background: rgba(46,204,113,0.3);
  border-color: #2ECC71;
  border-style: solid;
  color: #fff;
  animation: dz-correct-pop 0.5s ease both;
}
.tab-dropzone.dz-wrong {
  background: rgba(231,76,60,0.25);
  border-color: #E74C3C;
  border-style: solid;
  color: #fff;
  animation: dz-shake 0.45s ease both;
}
@keyframes dz-correct-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.25) rotate(-3deg); }
  65%  { transform: scale(1.1) rotate(2deg); }
  100% { transform: scale(1); }
}
@keyframes dz-shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-8px) rotate(-2deg); }
  40%     { transform: translateX(8px) rotate(2deg); }
  60%     { transform: translateX(-6px); }
  80%     { transform: translateX(6px); }
}

/* Feedback pill */
.tab-feedback-pill {
  margin-top: 0.75rem;
  font-family: "Baloo 2", cursive;
  font-size: 1.05rem;
  font-weight: 800;
  min-height: 1.8rem;
  transition: opacity 0.2s;
}
.pill-correct { color: #2ECC71; }
.pill-wrong   { color: #E74C3C; }

/* Answer chips grid */
.tab-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  max-width: 380px;
  margin: 0 auto;
}
.tab-chip {
  border: none;
  border-radius: 1.3rem;
  padding: 1.1rem 0.75rem 0.9rem;
  cursor: grab;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  box-shadow: 0 5px 18px rgba(0,0,0,0.3),
              inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.tab-chip:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 14px 32px rgba(0,0,0,0.38);
  filter: brightness(1.12);
  cursor: grab;
}
.tab-chip:active  { transform: scale(0.94); cursor: grabbing; }
.tab-chip.chip-dragging { opacity: 0.5 !important; }
.tab-chip.chip-correct {
  filter: brightness(1.2);
  box-shadow: 0 0 0 3px #2ECC71, 0 10px 28px rgba(46,204,113,0.4);
}
.tab-chip.chip-wrong {
  animation: chip-shake 0.4s ease both;
}
@keyframes chip-shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-6px) rotate(-3deg); }
  75%     { transform: translateX(6px) rotate(3deg); }
}
.chip-num  { font-family: "Baloo 2", cursive; font-size: 2.6rem; font-weight: 900; line-height: 1; }
.chip-word { font-size: 0.7rem; font-weight: 700; opacity: 0.82; }

/* Next button */
.tab-next-btn {
  font-family: "Baloo 2", cursive;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 0.65rem 2rem;
  border-radius: 2rem;
  box-shadow: 0 6px 20px rgba(46,204,113,0.45);
}

/* Completion screen */
.tab-complete-screen {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}
.tab-complete-inner {
  background: rgba(255,255,255,0.1);
  border-radius: 2rem;
  padding: 2.5rem 1.75rem 2rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.tab-complete-emoji { font-size: 5rem; line-height: 1; margin-bottom: 0.5rem; }
.tab-complete-title {
  font-family: "Baloo 2", cursive;
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 0.4rem;
  color: #fff;
}
.tab-complete-msg {
  font-size: 1.05rem;
  opacity: 0.85;
  line-height: 1.5;
}
.tab-big-btn {
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.65rem 1.5rem;
  border-radius: 1.5rem;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .num-grid2 { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); }
  .nc-number { font-size: 3rem; }
  .tab-selector-grid { grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
  .tsb-n { font-size: 1.8rem; }
  .tab-eq-num { font-size: 3.2rem; }
  .tab-eq-op  { font-size: 2.2rem; }
  .tab-dropzone { width: 72px; height: 64px; font-size: 2rem; }
  .chip-num { font-size: 2.1rem; }
}
@media (max-width: 380px) {
  .tab-equation-row { gap: 0.6rem; }
  .tab-eq-num { font-size: 2.7rem; }
}
