/**
 * CSS v2.8 (limpo) - COM SANFONA + MODAL iPhone + TOPBAR FIXA
 */

/* =========================================================
   FONTE
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

.edu-subject-container,
.edu-subject-container * {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* =========================================================
   LAYOUT BASE
   ========================================================= */
.edu-subject-container {
  max-width: 900px;
  margin: 30px auto;
  padding: 30px 40px;
  background: #fff;
  border-radius: 15px;
}

/* (HEADER DA MATÉRIA) — atualmente removido via display:none (ver seção TOPBAR) */
/* Mantive só a descrição porque pode aparecer em algum template/variação */
.subject-description {
  color: #666;
  font-size: 0.9em;
  margin: 12px 0 0 0;
  line-height: 1.6;
  font-weight: 400;
}

/* =========================================================
   PROGRESSO ANTIGO (CARD) — ESTÁ DESATIVADO VIA TOPBAR
   (REMOVIDO: styles detalhados não tinham efeito por causa do display:none)
   ========================================================= */

/* =========================================================
   FASE
   ========================================================= */
.edu-phase-container {
  background: #fff;
  border-radius: 12px;
  padding: 25px 30px;
  margin-top: 0;
}

/* HEADER DA FASE – TÍTULO CENTRAL REAL */
.edu-phase-header {
  position: relative;
  display: block;
  text-align: center;
  padding-bottom: 18px;
  margin-bottom: 20px;
}

/* Título */
.edu-phase-header h3 {
  margin: 0 0 12px 0;
  text-align: center;
  color: #1a1a1a;
  font-size: 1.25em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Botão voltar não empurra título */
.edu-prev-left {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.edu-phase-info {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.min-score {
  display: inline-flex;
  align-items: center;
  background: #fff3e0;
  color: #e65100;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8em;
  font-weight: 600;
  box-shadow: 0 2px 0 #ffcc80;
}

.attempts-info {
  display: inline-flex;
  align-items: center;
  background: #e8f1ff;
  color: #3d86ff;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8em;
  font-weight: 600;
  box-shadow: 0 2px 0 #b3d4ff;
}

/* Info button (normal, fora da topbar) */
.edu-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #e8f1ff;
  color: #3d86ff;
  border: 2px solid #3d86ff;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.edu-info-btn:hover {
  background: #3d86ff;
  color: white;
  transform: scale(1.1);
}

.edu-info-btn:active {
  transform: scale(0.95);
}

.edu-info-btn svg {
  display: block;
}

/* Botão voltar fase */
.edu-previous-phase-btn {
  display: inline-flex;
  align-items: center;
  background: #64748b;
  color: white;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8em;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 0 #475569;
}

.edu-previous-phase-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #94a3b8;
}

/* REMOVE ANIMAÇÃO DO BOTÃO "VOLTAR FASE" (mantém visual fixo) */
.edu-previous-phase-btn,
.edu-previous-phase-btn:hover,
.edu-previous-phase-btn:active,
.edu-previous-phase-btn:focus,
.edu-previous-phase-btn:focus-visible {
  transition: none !important;
  animation: none !important;
  transform: none !important;
  box-shadow: 0 2px 0 #475569 !important;
}

.edu-phase-description {
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 20px;
  border-left: 4px solid #3d86ff;
}

.edu-phase-description p {
  margin: 0;
  color: #555;
  line-height: 1.6;
  font-size: 0.9em;
}

/* =========================================================
   MODAL - FIX COMPLETO PARA IPHONE
   ========================================================= */
.edu-explanation-modal {
  display: block !important;
  visibility: hidden;
  opacity: 0;

  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;

  z-index: 2147483647 !important;

  transition: opacity 0.3s ease, visibility 0.3s ease;

  padding: 0 !important;
  margin: 0 !important;

  overflow: hidden;
}

.edu-explanation-modal.active {
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateZ(0);
}

.edu-explanation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.edu-explanation-content {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;

  width: 90% !important;
  max-width: 700px !important;
  max-height: 90vh !important;

  background: white !important;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);

  display: flex !important;
  flex-direction: column !important;

  z-index: 1;

  margin: 0 !important;
  padding: 0 !important;

  -webkit-transform: translate(-50%, -50%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.edu-explanation-modal.active .edu-explanation-content {
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
    -webkit-transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    -webkit-transform: translate(-50%, -50%) scale(1);
  }
}

.edu-explanation-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 34px !important;
  height: 34px !important;
  background: #f3f4f6 !important;
  border: none !important;
  border-radius: 50% !important;
  font-size: 22px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  color: #64748b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease;
  z-index: 2 !important;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.edu-explanation-close:hover {
  background: #e5e7eb !important;
  color: #1a1a1a !important;
  transform: rotate(90deg);
}

.edu-explanation-body {
  overflow-y: auto !important;
  flex: 1 !important;
  padding: 30px 30px 25px 30px !important;
  -webkit-overflow-scrolling: touch !important;
}

.edu-explanation-body h4 {
  margin: 0 0 15px 0 !important;
  color: #3d86ff !important;
  font-size: 1.2em !important;
  font-weight: 700 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px !important;
  border-bottom: 2px solid #e8f1ff !important;
}

.edu-explanation-body p {
  color: #555 !important;
  line-height: 1.7 !important;
  font-size: 0.95em !important;
  margin: 0 0 12px 0 !important;
}

.edu-explanation-body p:last-child {
  margin-bottom: 0 !important;
}

/* Prevenir scroll do body quando modal aberto */
body.edu-modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

/* =========================================================
   CONTAINER DO JOGO
   ========================================================= */
.edu-game-container {
  background: #fafafa;
  border: 2px dashed #d0d0d0;
  border-radius: 12px;
  padding: 40px 30px;
  min-height: 280px;
  margin-bottom: 0;
  position: relative;
  transition: all 0.3s ease;
}

.edu-game-container:empty::before {
  content: "⏳ Carregando jogo...";
  display: block;
  text-align: center;
  padding: 80px 0;
  color: #999;
  font-size: 1em;
  font-weight: 500;
}

/* Loading */
.edu-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.98);
  padding: 18px 35px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(61, 134, 255, 0.3);
  font-size: 0.95em;
  font-weight: 600;
  color: #3d86ff;
  z-index: 1000;
}

.edu-loading::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid #3d86ff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================================
   RESULTADO
   ========================================================= */
.edu-result-container { margin-top: 25px; }

.edu-result-box {
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.edu-result-box.passed {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  color: white;
}

.edu-result-box.failed {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  color: white;
}

.edu-result-box h3 {
  margin: 0 0 15px 0;
  font-size: 1.5em;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.edu-result-box p {
  margin: 10px 0;
  font-size: 0.95em;
  font-weight: 500;
}

.score-display {
  font-size: 1.5em !important;
  margin: 25px 0 !important;
  font-weight: 700;
}

.score-display strong {
  font-size: 1.4em;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
  display: block;
  margin-top: 8px;
}

.min-score-display {
  opacity: 0.95;
  font-size: 0.9em !important;
}

.edu-result-box .attempts-info {
  opacity: 0.9;
  font-size: 0.85em !important;
  margin-top: 20px !important;
  padding-top: 20px;
  border-top: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: inherit;
  box-shadow: none;
}

.completion-message {
  margin-top: 25px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.completion-message h3 {
  margin: 0 0 10px 0;
  font-size: 1.2em;
  font-weight: 700;
}

.completion-message p {
  margin: 0;
  font-size: 0.95em;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   BOTÕES (COR FIXA)
   ========================================================= */
.edu-next-phase-btn,
.edu-retry-btn {
  display: inline-block;
  margin: 15px 8px 0;
  padding: 14px 35px;
  font-size: 0.95em;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.edu-next-phase-btn {
  background: #3d86ff !important;
  color: white !important;
  box-shadow: 0 4px 0 #2563eb !important;
}

.edu-next-phase-btn:hover:not(:disabled),
.edu-next-phase-btn:focus:not(:disabled),
.edu-next-phase-btn:active:not(:disabled) {
  background: #3d86ff !important;
  color: white !important;
  text-decoration: none !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #2563eb !important;
}

.edu-next-phase-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #94a3b8 !important;
  box-shadow: 0 4px 0 #64748b !important;
}

.edu-retry-btn {
  background: #64748b !important;
  color: white !important;
  box-shadow: 0 4px 0 #475569 !important;
}

.edu-retry-btn:hover,
.edu-retry-btn:focus,
.edu-retry-btn:active {
  background: #64748b !important;
  color: white !important;
  text-decoration: none !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #475569 !important;
}

/* Estados finais */
.edu-login-required,
.edu-no-phases,
.edu-max-attempts {
  text-align: center;
  padding: 50px 30px;
  background: linear-gradient(135deg, #3d86ff 0%, #5c9aff 100%);
  color: white;
  border-radius: 15px;
  box-shadow: 0 6px 25px rgba(61, 134, 255, 0.3);
}

.edu-login-required p,
.edu-no-phases p,
.edu-max-attempts p {
  font-size: 1em;
  margin: 0;
  line-height: 1.6;
  font-weight: 500;
}

/* =========================================================
   SANFONA DE INSTRUÇÕES
   ========================================================= */
.edu-instructions-accordion { margin-bottom: 20px; }

.edu-instructions-toggle {
  width: 100%;
  padding: 15px 20px;
  font-size: 15px;
  border: none;
  background: #f3f4f6;
  color: #374151;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 0 #d1d5db;
  transition: all 0.2s ease;
  position: relative;
  z-index: 999;
  font-family: 'Poppins', sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.edu-arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.edu-instructions-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.edu-instructions-body {
  padding: 15px;
  border: 2px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: white;
}

.edu-instructions-body ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: #374151;
}

.edu-instructions-body li { margin-bottom: 8px; }
.edu-instructions-body li:last-child { margin-bottom: 0; }

/* =========================================================
   PATCHES ANTI-TEMA (mantidos, mas sem duplicação)
   ========================================================= */

/* Remove efeito/cor do tema (#c36) SOMENTE no .edu-info-btn */
.edu-subject-container .edu-info-btn,
.edu-subject-container .edu-info-btn:focus,
.edu-subject-container .edu-info-btn:active,
.edu-subject-container .edu-info-btn:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.edu-subject-container .edu-info-btn:active,
.edu-subject-container .edu-info-btn:focus,
.edu-subject-container .edu-info-btn:focus-visible {
  background: #e8f1ff !important;
  color: #3d86ff !important;
  border-color: #3d86ff !important;
}

/* Sanfona: força total contra tema */
.edu-subject-container .edu-instructions-toggle,
.edu-subject-container .edu-instructions-toggle:active,
.edu-subject-container .edu-instructions-toggle:focus,
.edu-subject-container .edu-instructions-toggle:focus-visible,
.edu-subject-container .edu-instructions-toggle:focus-within,
.edu-subject-container .edu-instructions-toggle:visited,
.edu-subject-container .edu-instructions-toggle:link {
  background: #f3f4f6 !important;
  color: #374151 !important;
  text-decoration: none !important;
  outline: none !important;
  border: none !important;
  box-shadow: 0 4px 0 #d1d5db !important;
}

.edu-subject-container .edu-instructions-toggle:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 0 #d1d5db !important;
  background: #e5e7eb !important;
  color: #374151 !important;
}

.edu-subject-container .edu-instructions-toggle:active {
  transform: translateY(2px) !important;
  box-shadow: 0 2px 0 #d1d5db !important;
  background: #e5e7eb !important;
  color: #374151 !important;
}

/* =========================================================
   TOPBAR FIXA - PROGRESSO (COM POPPINS)
   ========================================================= */
.edu-topbar-progress,
.edu-topbar-progress * {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.edu-topbar-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  background: #ffffff;
  border-bottom: 2px solid #e8f1ff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.edu-topbar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 16px 10px;
}

/* Linha: título à esquerda, meta à direita */
.edu-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.edu-topbar-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

/* Meta (fase + tentativas) */
.edu-topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.edu-topbar-phase {
  display: inline-flex;
  align-items: center;
  background: #e8f1ff;
  color: #3d86ff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 0 #b3d4ff;
  white-space: nowrap;
}

.edu-topbar-attempts {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

/* Barra da topbar */
.edu-topbar-bar {
  margin-top: 8px;
  height: 10px;
  background: #e8f1ff;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.edu-topbar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3d86ff 0%, #5c9aff 100%);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Anti-tema total para o botão info na topbar */
.edu-topbar-progress button.edu-topbar-info-btn,
.edu-topbar-progress a.edu-topbar-info-btn,
.edu-topbar-progress .edu-topbar-info-btn,
.edu-topbar-progress button.edu-info-btn,
.edu-topbar-progress a.edu-info-btn,
.edu-topbar-progress .edu-info-btn {
  -webkit-appearance: none !important;
  appearance: none !important;

  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;

  background-color: #e8f1ff !important;
  background-image: url("https://boxlevel.com.br/wp-content/uploads/2026/01/cropped-9rdiKPVACPgafRyQZvkn.png") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 20px 20px !important;

  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;

  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  cursor: pointer !important;

  transition: none !important;
  animation: none !important;
  transform: none !important;

  -webkit-tap-highlight-color: transparent !important;
}

.edu-topbar-progress button.edu-topbar-info-btn:hover,
.edu-topbar-progress button.edu-topbar-info-btn:focus,
.edu-topbar-progress button.edu-topbar-info-btn:focus-visible,
.edu-topbar-progress button.edu-topbar-info-btn:active,
.edu-topbar-progress .edu-info-btn:hover,
.edu-topbar-progress .edu-info-btn:focus,
.edu-topbar-progress .edu-info-btn:focus-visible,
.edu-topbar-progress .edu-info-btn:active {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  animation: none !important;
  transform: none !important;
  background-color: #dbeafe !important;
}

.edu-topbar-progress .edu-topbar-info-btn::before,
.edu-topbar-progress .edu-topbar-info-btn::after,
.edu-topbar-progress .edu-info-btn::before,
.edu-topbar-progress .edu-info-btn::after {
  content: none !important;
  display: none !important;
  box-shadow: none !important;
  border: 0 !important;
}

.edu-topbar-progress .edu-topbar-info-btn,
.edu-topbar-progress .edu-info-btn {
  filter: none !important;
}

/* Remove elementos antigos (mantém comportamento atual) */
.edu-subject-container .edu-phase-progress { display: none !important; }
.edu-subject-header { display: none !important; }

/* =========================================================
   ACESSIBILIDADE / RESET IOS
   ========================================================= */
.edu-next-phase-btn:focus,
.edu-retry-btn:focus,
.edu-previous-phase-btn:focus,
.edu-info-btn:focus {
  outline: 3px solid rgba(61, 134, 255, 0.5);
  outline-offset: 2px;
}

* { -webkit-tap-highlight-color: transparent; }

button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* =========================================================
   ADMIN (WP) - TABELAS
   ========================================================= */
.form-table th { width: 200px; }

.form-table input[type="number"],
.form-table input.regular-text {
  width: 100%;
  max-width: 400px;
}

textarea#game_code {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
}

.column-ordem,
.column-nota_minima { width: 100px; }

.tablenav.top { margin-bottom: 20px; }
.tablenav select { min-width: 200px; }

/* =========================================================
   RESPONSIVO (MOBILE + TABLET)
   ========================================================= */
@media (max-width: 768px) {
  .edu-subject-container {
    margin: 0 !important;
    padding: 6px !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 20px !important;
    box-shadow: none !important;
    padding-top: 40px !important; /* mais alto no iPhone */
  }

  body {
    margin: 0 !important;
    padding: 0 !important;
  }

  .site, .site-content, .content-area, .elementor-section, .elementor-container,
  .entry-content, article, main, .hentry, #primary, #content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .edu-phase-container {
    padding: 12px 8px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .edu-phase-header h3 { font-size: 1.1em; }

  .edu-phase-description {
    margin-bottom: 15px;
    border-radius: 8px;
    padding: 12px 8px;
  }

  .edu-info-btn {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  /* Modal mobile */
  .edu-explanation-content {
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
    max-height: 90vh !important;
    border-radius: 10px !important;
  }

  .edu-explanation-body {
    padding: 24px 24px 20px 16px !important;
    max-height: calc(90vh - 60px) !important;
  }

  .edu-explanation-body h4 {
    font-size: 1.05em !important;
    margin-bottom: 10px !important;
    padding-bottom: 8px !important;
  }

  .edu-explanation-body p {
    font-size: 0.9em !important;
    margin-bottom: 12px !important;
    line-height: 1.6 !important;
  }

  .edu-explanation-close {
    width: 32px !important;
    height: 32px !important;
    font-size: 20px !important;
    top: 8px !important;
    right: 8px !important;
  }

  /* Game */
  .edu-game-container {
    padding: 20px 0 !important;
    min-height: 200px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-left: -8px;
    margin-right: -8px;
    width: calc(100% + 16px);
  }

  /* Resultados */
  .edu-result-box {
    padding: 20px 12px;
    border-radius: 12px;
  }

  .edu-result-box h3 { font-size: 1.3em; }
  .score-display { font-size: 1.35em !important; }
  .score-display strong { font-size: 1.3em; }

  .min-score,
  .attempts-info,
  .edu-previous-phase-btn {
    padding: 5px 12px;
    font-size: 0.75em;
  }

  .edu-next-phase-btn,
  .edu-retry-btn {
    display: block;
    width: calc(100% - 16px);
    margin: 12px 8px;
    padding: 14px 20px;
    font-size: 0.9em;
  }

  .edu-login-required,
  .edu-no-phases,
  .edu-max-attempts {
    padding: 30px 15px;
    border-radius: 12px;
  }

  .edu-login-required p,
  .edu-no-phases p,
  .edu-max-attempts p {
    font-size: 0.9em;
  }

  .completion-message { padding: 20px; }

  /* Header da fase: botão voltar vira bloco acima no mobile */
  .edu-prev-left {
    position: static;
    transform: none;
    margin-bottom: 10px;
  }

  /* Sanfona mobile */
  .edu-instructions-accordion { margin-bottom: 15px; }

  .edu-instructions-toggle {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 8px;
  }

  .edu-instructions-body {
    padding: 12px;
    border-radius: 0 0 8px 8px;
  }

  .edu-instructions-body ul {
    font-size: 13px;
    padding-left: 18px;
  }

  .edu-instructions-body li { margin-bottom: 6px; }

  /* Topbar mobile */
  .edu-topbar-inner { padding: 10px 12px 8px; }
  .edu-topbar-title { font-size: 13px; }
  .edu-topbar-meta  { font-size: 11px; }
  .edu-topbar-bar   { height: 8px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .edu-subject-container {
    padding: 30px 35px;
    margin: 25px 20px;
  }

  .edu-phase-header h3 { font-size: 1.2em; }

  .edu-game-container { padding: 35px 25px; }

  .edu-next-phase-btn,
  .edu-retry-btn {
    padding: 13px 32px;
    font-size: 0.9em;
  }

  .edu-explanation-content {
    max-width: 650px;
    width: 90% !important;
    max-height: 90vh !important;
  }
}
.edu-game-container{
  width: 850px;
  height: 520px;

  max-width: 100%;
  margin: 20px auto 0;

  position: relative;
  overflow: hidden;
  border-radius: 18px;

  background: #fff;
  border: 1px solid #e3e3e3;

  box-sizing: border-box;
  padding: 0;
}

/* Conteúdo do jogo respeita o painel */
.edu-game-container .bs-game-root{
  width: 100%;
  height: 100%;
  position: relative;
  box-sizing: border-box;
}

.edu-game-container canvas{
  width: 100%;
  height: 100%;
  display: block;
}

/* 📱 MOBILE (iPhone) — força encaixe dentro do painel */
@media (max-width: 768px){
  .edu-game-container{
    width: 100% !important;
    height: 346px !important; /* 520 - 1/3 ≈ 346 */
    max-width: 100% !important;
  }

  .edu-game-container .bs-game-root{
    width: 100% !important;
    height: 100% !important;
  }

  .edu-game-container canvas{
    width: 100% !important;
    height: 100% !important;
  }
}
/* ===== RODAPÉ FIXO ===== */
.edu-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: #fff;
  border-top: 1px solid #eaeaea;
}

.edu-bottom-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== BOTÕES ===== */
.edu-bottom-actions {
  display: flex;
  gap: 14px;
}

/* Base comum */
.edu-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

/* Clique */
.edu-btn:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
}

/* Desabilitado */
.edu-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===== BOTÃO VERIFICAR (AZUL) ===== */
.edu-verify-btn {
  background: linear-gradient(180deg, #1aa3ff, #0077e6);
}

.edu-verify-btn:hover {
  filter: brightness(1.05);
}

/* ===== BOTÃO PULAR (VERMELHO) ===== */
.edu-skip-btn {
  background: linear-gradient(180deg, #ff4b4b, #e60000);
}

/* Hover */
.edu-skip-btn:hover {
  filter: brightness(1.05);
}

/* ===== MOBILE ===== */
@media (max-width: 520px) {
  .edu-bottom-inner {
    flex-direction: column;
    gap: 12px;
  }

  .edu-bottom-actions {
    width: 100%;
  }

  .edu-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Espaço para não cobrir o jogo */
.edu-phase-container {
  padding-bottom: 100px;
}
/* ===== BASE (mantém tudo travado contra o tema) ===== */
.edu-bottom-actions .edu-btn {
  all: unset;
  box-sizing: border-box;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 12px 26px;
  min-height: 44px;

  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;

  border-radius: 50px;
  cursor: pointer;

  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    filter 0.08s ease;
}

/* Clique (afunda) */
.edu-bottom-actions .edu-btn:active {
  transform: translateY(4px);
  box-shadow: none;
}

/* ===== VERIFICAR — AZUL ===== */
.edu-bottom-actions .edu-verify-btn {
  background-color: #0d8cff !important;
  color: #ffffff !important;

  /* sombra azul mais escura */
  box-shadow: 0 4px 0 #0a6fca;
}

/* ===== PULAR — VERMELHO ===== */
.edu-bottom-actions .edu-skip-btn {
  background-color: #ff2f2f !important;
  color: #ffffff !important;

  /* sombra vermelha mais escura */
  box-shadow: 0 4px 0 #c61f1f;
}

/* ===== MOBILE ===== */
@media (max-width: 520px) {
  .edu-bottom-actions {
    width: 100%;
    flex-direction: column;
  }
  .edu-bottom-actions .edu-btn {
    width: 100%;
  }
}

/* Espaço pro rodapé */
.edu-phase-container {
  padding-bottom: 100px;
}
/* ===============================
   MOEDAS NA TOPBAR — MOBILE
   =============================== */
@media (max-width: 768px) {
  .edu-topbar-coins {
    font-size: 16px;        /* texto maior */
    padding: 6px 14px;      /* cápsula maior */
    gap: 8px;
  }

  .edu-topbar-coins strong {
    font-size: 18px;        /* número maior */
  }

  .edu-topbar-coins::before {
    font-size: 20px;        /* moeda maior */
  }
}
/* Botão verificar desativado (cinza) */
.edu-btn.edu-verify-btn.is-disabled,
.edu-btn.edu-verify-btn:disabled {
  background: #bdbdbd !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
  filter: none !important;
    box-shadow: 0 4px 0 #808080;

}
/* Estado normal (apenas garante que o tema não quebre depois) */
/* Hover / Focus: cinza mais escuro, sem alterar o estado normal */
button.edu-previous-phase-btn.edu-prev-left:hover,
button.edu-previous-phase-btn.edu-prev-left:focus,
button.edu-previous-phase-btn.edu-prev-left:focus-visible,
button.edu-previous-phase-btn.edu-prev-left:active {
  background-color: #566479 !important; /* cinza mais escuro */
}
/* ÍCONE DE MOEDA (TOPBAR) */
.edu-topbar-coins{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.edu-topbar-coins .edu-coin-icon{
  width: 20px;
  height: 20px;
  display: inline-block;

  background-image: url("https://boxlevel.com.br/wp-content/uploads/2026/02/OjG03AOkwiKbDlrpIQyb.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.bs-edu-prefase-start{
  background:#3d86ff !important;
  color:#ffffff !important;
  border:0 !important;
  border-radius:999px !important;
  padding:12px 28px !important;
  min-height:44px;
  font-family:Poppins, sans-serif !important;
  font-weight:600 !important; /* peso ajustado */
  font-size:15px !important;
  line-height:1 !important;
  text-transform:none !important;

  /* sombra mais limpa */
  box-shadow:0 4px 0 #2d5eaf !important;

  cursor:pointer;
  transition:transform .08s ease, box-shadow .08s ease, filter .15s ease;
  outline:none !important;
}

.bs-edu-prefase-start:hover{
  filter:brightness(1.04);
}

/* CLICK MAIS SUTIL */
.bs-edu-prefase-start:active{
  transform:translateY(2px); /* antes 6px */
  box-shadow:0 2px 0 #2d5eaf !important;
}

.bs-edu-prefase-start:focus-visible{
  box-shadow:
    0 4px 0 #2d5eaf
}

.bs-edu-prefase-start[disabled],
.bs-edu-prefase-start:disabled{
  opacity:.75;
  cursor:not-allowed;
  transform:none !important;
  filter:none !important;
}

.edu-game-container{
  opacity: 1 !important;    
  filter: none !important;
}
/* =========================================================
   Toast/Card discreto acima do rodapé (desktop + mobile)
   ========================================================= */

:root{
  --edu-bottombar-h: 72px; /* fallback */
  --edu-toast-gap: 12px;
}

/* container do toast */
.edu-bottom-toast{
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--edu-bottombar-h) + var(--edu-toast-gap) + env(safe-area-inset-bottom));
  z-index: 999999; /* acima do jogo e do rodapé */
  pointer-events: none; /* não atrapalha cliques no jogo */
  display: flex;
  justify-content: center;
  padding: 0 14px;
}

/* card */
.edu-bottom-toast .edu-toast-card{
  pointer-events: none;
  width: min(680px, 100%);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 35px rgba(0,0,0,0.14);
  border: 1px solid rgba(0,0,0,0.06);

  transform: translateY(16px);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* estado visível */
.edu-bottom-toast.is-show .edu-toast-card{
  transform: translateY(0);
  opacity: 1;
}
/* ================================
   TOAST — PILL PEQUENA ACIMA DO RODAPÉ
   (sem sombra desfocada / sem blur)
   ================================ */

/* container */
.edu-bottom-toast{
  position: fixed;
  left: 50%;
  bottom: calc(var(--edu-bottombar-h, 72px) + 10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10000;
  pointer-events: none;
}

/* pill (BASE) — SEM SOMBRA DESFOCADA */
.edu-bottom-toast .edu-toast-card{
  border-radius: 999px;

  /* limita o tamanho no desktop */
  max-width: 360px;
  width: auto;

  padding: 8px 16px;
  gap: 6px;

  display: flex;
  flex-direction: column;
  align-items: center;

  /* ✅ tira qualquer sombra/blur que exista do estilo antigo */
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 0 !important;
}

/* título */
.edu-bottom-toast .edu-toast-title{
  font-size: 13px;
  font-weight: 800;
  color: rgba(0,0,0,0.55);
  line-height: 1;
  text-align: center;
}

/* remove “Passou” */
.edu-bottom-toast .edu-toast-pill{
  display: none;
}

/* cápsula branca da nota */
.edu-bottom-toast .edu-toast-sub{
  background: #ffffff;
  border-radius: 999px;

  padding: 6px 14px;

  font-size: 15px;
  font-weight: 900;
  color: #111;

  line-height: 1;
  text-align: center;
  white-space: nowrap;

  /* garante sem sombra também */
  box-shadow: none !important;
  filter: none !important;
}

/* ==========================================
   PASSOU — verde CLARO no mesmo estilo do cinza
   (quando is-passed)
   ========================================== */
.edu-bottom-toast.is-passed .edu-toast-card{
  background: #bbf7d0;  /* verde mais claro */
}

.edu-bottom-toast.is-passed .edu-toast-title{
  color: rgba(0,0,0,0.55);
}

.edu-bottom-toast.is-passed .edu-toast-sub{
  background: #ffffff;
  color: #111;
}

/* ==========================================
   ERRO — pill cinza claro (quando is-failed)
   ========================================== */
.edu-bottom-toast.is-failed .edu-toast-card{
  background: #e5e7eb;
}

.edu-bottom-toast.is-failed .edu-toast-title{
  color: #6b7280;
}

.edu-bottom-toast.is-failed .edu-toast-sub{
  background: #ffffff;
  color: #111;
}

/* mobile: ainda mais compacta */
@media (max-width: 520px){
  .edu-bottom-toast .edu-toast-card{
    max-width: 90vw;
    padding: 8px 14px;
  }
}

/* ==========================================
   MOBILE — sobe a pill SÓ quando errar (is-failed)
   ========================================== */
@media (max-width: 520px){

  /* padrão (passou): posição normal */
  .edu-bottom-toast{
    bottom: calc(var(--edu-bottombar-h, 72px) + 10px + env(safe-area-inset-bottom)) !important;
  }

  /* errou: sobe mais pra não encostar no botão extra */
  .edu-bottom-toast.is-failed{
    bottom: calc(var(--edu-bottombar-h, 72px) + 70px + env(safe-area-inset-bottom)) !important;
  }
}
/* Botão pular fase com ícone em imagem */
.edu-skip-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;              /* espaço entre ícone e texto */
}

/* Substitui o emoji/ícone por imagem */
.edu-skip-btn::before{
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;

  background-image: url("https://boxlevel.com.br/wp-content/uploads/2026/01/avfqlNfvHZYJoBErJakD.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
/* Quando for erro, remove o ícone do botão */
.edu-skip-btn.is-error::before{
  content: none !important;
  background-image: none !important;
}
@media (max-width: 768px) {

  /* ERROU */
  .edu-phase-container.edu-state-failed .edu-phase-header h3,
  .edu-phase-container.edu-state-failed .edu-previous-phase-btn,
  .edu-phase-container.edu-state-failed .edu-instructions-toggle {
    display: none !important;
  }

  .edu-phase-container.edu-state-failed {
    margin-top: -10px;
  }

  /* ACERTOU */
  .edu-phase-container.edu-state-passed .edu-phase-header h3,
  .edu-phase-container.edu-state-passed .edu-previous-phase-btn,
  .edu-phase-container.edu-state-passed .edu-instructions-toggle {
    display: none !important;
  }

  .edu-phase-container.edu-state-passed {
    margin-top: -10px;
  }

}
/* Ocultar indicador de processando */
.edu-loading {
  display: none !important;
}
