/* =========================================================================
   BRAIN GYM ISLAND (ISOLA DELLA SUPER MENTE) - CSS v3.3
   Universal Design for Learning (UDL) & Neurocognitive Empowerment
   ========================================================================= */

#braingym-screen {
  padding: 10px 14px 40px 14px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  font-family: 'Fredoka', 'Nunito', 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
}

.braingym-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* 6 Modality Tabs Bar */
.braingym-tabs-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 4px 10px 4px;
  scrollbar-width: thin;
  scrollbar-color: #ec4899 #f1f5f9;
  -webkit-overflow-scrolling: touch;
}

.braingym-tab-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #ffffff;
  border: 3px solid #e2e8f0;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 0 #cbd5e1;
  white-space: nowrap;
}

.braingym-tab-btn:hover {
  transform: translateY(-2px);
  border-color: #ec4899;
  color: #db2777;
  box-shadow: 0 5px 0 #cbd5e1;
}

.braingym-tab-btn.active {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: #ffffff;
  border-color: #be185d;
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.4);
}

/* Sublevel Chips Bar */
.braingym-sublevel-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
  width: 100%;
  scrollbar-width: none;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.braingym-sublevel-btn {
  flex: 0 0 auto;
  padding: 8px 16px;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.braingym-sublevel-btn:hover {
  border-color: #ec4899;
  color: #be185d;
  background: #fdf2f8;
}

.braingym-sublevel-btn.active {
  background: #0f172a;
  color: #facc15;
  border-color: #facc15;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Game Card Wrapper */
.braingym-game-card {
  background: #ffffff;
  border: 4px solid #e2e8f0;
  border-radius: 28px;
  padding: 24px 24px;
  box-shadow: 0 10px 0 #cbd5e1, 0 18px 30px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.braingym-level-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 2px dashed #e2e8f0;
}

.braingym-level-title {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.braingym-score-pill {
  background: #fef3c7;
  color: #b45309;
  border: 2px solid #fde68a;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 1rem;
}

/* ================= 1. TACHISTOSCOPE (LETTURA LAMPO) ================= */
.tachi-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  box-sizing: border-box;
}

.tachi-speed-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  padding: 8px 16px;
  border-radius: 50px;
}

.tachi-speed-btn {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tachi-speed-btn.active {
  background: #ec4899;
  color: #ffffff;
  border-color: #be185d;
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.35);
}

.tachi-target-box {
  width: 100%;
  height: 200px;
  background: #0f172a;
  border: 4px solid #db2777;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.5), 0 8px 0 #be185d;
  cursor: pointer;
}

.tachi-reticle {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle, transparent 65%, rgba(236, 72, 153, 0.15) 100%),
    linear-gradient(to right, transparent 49.5%, rgba(236, 72, 153, 0.25) 50%, transparent 50.5%),
    linear-gradient(to bottom, transparent 49.5%, rgba(236, 72, 153, 0.25) 50%, transparent 50.5%);
  pointer-events: none;
}

.tachi-flash-word {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-size: 3.8rem;
  font-weight: 900;
  color: #facc15;
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(250, 204, 21, 0.6);
  z-index: 2;
  text-align: center;
  user-select: none;
}

.tachi-countdown {
  font-size: 5rem;
  font-weight: 900;
  color: #38bdf8;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tachi-ready-pulse {
  font-size: 1.5rem;
  font-weight: 800;
  color: #94a3b8;
  animation: pulse 1.2s infinite;
}

.tachi-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 600px;
}

.tachi-opt-btn {
  background: #ffffff;
  border: 3px solid #cbd5e1;
  border-radius: 20px;
  padding: 18px 20px;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 6px 0 #94a3b8;
  transition: all 0.15s ease;
  text-align: center;
  user-select: none;
}

.tachi-opt-btn:hover {
  transform: translateY(-2px);
  border-color: #db2777;
  color: #be185d;
  box-shadow: 0 8px 0 #be185d;
  background: #fdf2f8;
}

.tachi-opt-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #be185d;
}

.tachi-opt-btn.correct {
  background: #22c55e !important;
  color: #ffffff !important;
  border-color: #16a34a !important;
  box-shadow: 0 6px 0 #15803d !important;
}

.tachi-opt-btn.wrong {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  box-shadow: 0 6px 0 #b91c1c !important;
  animation: shake 0.4s ease;
}

.tachi-opt-btn.hint-glow {
  border-color: #22c55e !important;
  background: #f0fdf4 !important;
  color: #15803d !important;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.7), 0 6px 0 #16a34a !important;
  animation: pulse 0.8s infinite;
}

/* ================= 2. GO / NO-GO (FRENA L'IMPULSO - CLEAN DESIGN) ================= */
.gonogo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  box-sizing: border-box;
}

.gonogo-rules-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  max-width: 720px;
}

.gonogo-rule-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 3px solid;
}

.gonogo-rule-item.go-item {
  background: #f0fdf4;
  border-color: #86efac;
}

.gonogo-rule-item.nogo-item {
  background: #fef2f2;
  border-color: #fca5a5;
}

.gonogo-rule-tag {
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.gonogo-rule-item.go-item .gonogo-rule-tag {
  color: #15803d;
}

.gonogo-rule-item.nogo-item .gonogo-rule-tag {
  color: #b91c1c;
}

.gonogo-rule-icons-list {
  display: flex;
  gap: 8px;
  font-size: 1.8rem;
  flex-wrap: wrap;
}

.gonogo-progress-tracker {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.gonogo-round-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 900;
  color: #64748b;
  transition: all 0.2s ease;
}

.gonogo-round-dot.current {
  background: #facc15;
  border-color: #ca8a04;
  color: #78350f;
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.8);
}

.gonogo-round-dot.hit, .gonogo-round-dot.restrained {
  background: #22c55e;
  border-color: #16a34a;
  color: #ffffff;
}

.gonogo-round-dot.miss, .gonogo-round-dot.impulse_error {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
}

.gonogo-clean-arena {
  width: 100%;
  max-width: 500px;
  height: 260px;
  background: #0f172a;
  border: 5px solid #334155;
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 4px 16px rgba(0, 0, 0, 0.6), 0 8px 0 #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.gonogo-clean-arena:hover {
  border-color: #64748b;
}

.gonogo-clean-arena.arena-go {
  border-color: #22c55e;
  box-shadow: inset 0 0 30px rgba(34, 197, 94, 0.3), 0 0 25px rgba(34, 197, 94, 0.4);
}

.gonogo-clean-arena.arena-nogo {
  border-color: #ef4444;
  box-shadow: inset 0 0 30px rgba(239, 68, 68, 0.3), 0 0 25px rgba(239, 68, 68, 0.4);
}

.gonogo-time-bar-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
}

.gonogo-time-bar {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
  width: 100%;
  transition: width linear;
}

.gonogo-stimulus-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gonogo-stimulus-icon {
  font-size: 6.5rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.gonogo-stimulus-name {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
}

.gonogo-tap-btn-clean {
  width: 100%;
  max-width: 500px;
  padding: 18px 24px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  border: 4px solid #86efac;
  border-radius: 24px;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 0 #15803d, 0 12px 25px rgba(34, 197, 94, 0.35);
  transition: all 0.12s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.gonogo-tap-btn-clean:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 #15803d, 0 16px 30px rgba(34, 197, 94, 0.45);
}

.gonogo-tap-btn-clean:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 #15803d;
}

/* ================= 3. SUBITIZING (COLPO D'OCCHIO - FLASH & MASK) ================= */
.subitizing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  box-sizing: border-box;
}

.subitizing-box {
  width: 100%;
  max-width: 600px;
  min-height: 220px;
  background: #0f172a;
  border: 4px solid #6366f1;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.5), 0 8px 0 #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subitizing-mystery-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: popIn 0.25s ease;
}

.subitizing-mystery-icon {
  font-size: 4.5rem;
  color: #facc15;
  filter: drop-shadow(0 0 15px rgba(250, 204, 21, 0.8));
  animation: pulse 1s infinite;
}

.subitizing-mystery-text {
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
  text-align: center;
}

.subitizing-dot {
  position: absolute;
  width: 38px;
  height: 38px;
  background: radial-gradient(circle, #facc15 0%, #f59e0b 100%);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.8), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  animation: popIn 0.2s ease;
}

.subitizing-options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 500px;
}

/* Number Line */
.numberline-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  box-sizing: border-box;
}

.numberline-track-wrapper {
  width: 100%;
  padding: 24px 18px;
  background: #f8fafc;
  border: 3px solid #cbd5e1;
  border-radius: 24px;
  position: relative;
  box-sizing: border-box;
}

.numberline-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 18px;
  border-radius: 10px;
  background: linear-gradient(90deg, #38bdf8 0%, #6366f1 100%);
  outline: none;
  cursor: pointer;
}

.numberline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  cursor: pointer;
  transition: transform 0.1s ease;
}
.numberline-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.numberline-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-weight: 800;
  color: #475569;
  font-size: 1.15rem;
}

.numberline-target-box {
  background: #eef2ff;
  border: 3px solid #c7d2fe;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1.5rem;
  font-weight: 900;
  color: #3730a3;
  text-align: center;
}

/* ================= 4. COPPIE MINIME (SUONI GEMELLI) & CAA ================= */
.caa-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  box-sizing: border-box;
}

.mp-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}

.mp-card-btn {
  background: #ffffff;
  border: 4px solid #cbd5e1;
  border-radius: 28px;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 8px 0 #94a3b8, 0 14px 25px rgba(0, 0, 0, 0.05);
  transition: all 0.18s ease;
}

.mp-card-btn:hover {
  transform: translateY(-3px);
  border-color: #0284c7;
  box-shadow: 0 10px 0 #0284c7, 0 18px 30px rgba(2, 132, 199, 0.18);
  background: #f0f9ff;
}

.mp-card-btn.correct {
  background: #dcfce7 !important;
  border-color: #22c55e !important;
  box-shadow: 0 8px 0 #16a34a !important;
  transform: scale(1.03);
}

.mp-card-btn.wrong {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  box-shadow: 0 8px 0 #dc2626 !important;
  animation: shake 0.4s ease;
}

.mp-card-icon {
  font-size: 5.5rem;
  line-height: 1;
}

.mp-card-label {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 2px;
}

.caa-strip-wrapper {
  background: #f8fafc;
  border: 3px dashed #cbd5e1;
  border-radius: 20px;
  padding: 14px 16px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.caa-strip-tiles {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.caa-strip-tile {
  background: #ffffff;
  border: 2px solid #38bdf8;
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

.caa-symbols-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  width: 100%;
}

.caa-symbol-btn {
  background: #ffffff;
  border: 3px solid #e2e8f0;
  border-radius: 18px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 0 #cbd5e1;
  transition: all 0.15s ease;
}

.caa-symbol-btn:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
  box-shadow: 0 6px 0 #0284c7;
  background: #f0f9ff;
}

/* ================= 5. WORKING MEMORY (SUPER MEMORIA & SCALA MUSICALE) ================= */
.memory-board-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  box-sizing: border-box;
}

.memory-step-indicator {
  padding: 14px 32px;
  border-radius: 999px;
  background: #f8fafc;
  border: 3px solid #cbd5e1;
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  text-align: center;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
}

.memory-slots-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 620px;
  margin: 4px 0;
}

.memory-slot-chip {
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 1rem;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.memory-slot-chip.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  transform: scale(1.06);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.memory-slot-chip.done {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
}

.memory-pads-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  width: 100%;
  max-width: 440px;
}

.memory-pads-grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 580px;
}

.memory-pads-grid-8 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 680px;
}

.memory-pad {
  aspect-ratio: 1;
  border-radius: 24px;
  border: 4px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2), 0 12px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 2.6rem;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
  position: relative;
}

.memory-pad-note-tag {
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 1px;
}

.memory-pad:hover {
  transform: scale(1.03);
}

.memory-pad:active {
  transform: scale(0.96) translateY(4px);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
}

.memory-pad.glowing {
  transform: scale(1.08);
  filter: brightness(1.7) drop-shadow(0 0 25px #ffffff);
  border-color: #ffffff;
}

.memory-pad.locked {
  pointer-events: none;
  opacity: 0.85;
}

.memory-pad.wrong-shake {
  animation: shake 0.4s ease;
  border-color: #ef4444 !important;
}

/* ================= 6. FLUID PATH (FILO D'ORO - STRICT VERIFICATION) ================= */
.fluid-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  box-sizing: border-box;
}

.fluid-track-selector-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 4px 10px 4px;
  width: 100%;
  scrollbar-width: thin;
  box-sizing: border-box;
}

.fluid-track-btn {
  flex: 0 0 auto;
  padding: 8px 16px;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.fluid-track-btn:hover {
  border-color: #f59e0b;
  color: #b45309;
  background: #fefce8;
}

.fluid-track-btn.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border-color: #b45309;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.35);
}

.fluid-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 820px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 10px 0 #b45309, 0 18px 30px rgba(0, 0, 0, 0.15);
  border: 4px solid #f59e0b;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fluid-canvas-wrapper.out-of-bounds {
  border-color: #ef4444 !important;
  box-shadow: 0 10px 0 #b91c1c, 0 0 25px rgba(239, 68, 68, 0.6) !important;
  animation: shake 0.3s ease;
}

.fluid-canvas {
  width: 100%;
  height: 400px;
  background: #0f172a;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.fluid-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 820px;
  padding: 10px 18px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  box-sizing: border-box;
  font-weight: 800;
  color: #334155;
  flex-wrap: wrap;
  gap: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .braingym-game-card {
    padding: 16px 14px;
    border-radius: 20px;
  }
  .tachi-flash-word {
    font-size: 2.6rem;
  }
  .tachi-target-box {
    height: 160px;
  }
  .gonogo-rules-bar {
    grid-template-columns: 1fr;
  }
  .gonogo-tap-btn-clean {
    font-size: 1.25rem;
    padding: 16px 18px;
  }
  .mp-cards-grid {
    grid-template-columns: 1fr;
  }
  .mp-card-label {
    font-size: 1.8rem;
  }
  .memory-pads-grid-8 {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .memory-pad {
    font-size: 2rem;
    border-radius: 16px;
  }
  .fluid-canvas {
    height: 320px;
  }
}

@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
