@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Baloo+2:wght@600;700&family=Nunito:wght@400;600;700;800&display=swap');

/* ========================================================
   VARIÁVEIS DE COR E TEMA NUVITO - TORRE DE HANÓI
   ======================================================== */
:root {
  --laranja: #ff8a3d;
  --laranja-escuro: #d66e2d;
  --azul-ceu: #a5d8ff;
  --azul-escuro: #2f7dff;
  --verde: #2ecc71;
  --verde-escuro: #219653;
  --vermelho: #ff7675;
  --vermelho-escuro: #d63031;
  --roxo: #a29bfe;
  --roxo-escuro: #6c5ce7;
  --amarelo: #f1c40f;
  --amarelo-escuro: #d4ac0d;
  --cinza: #636e72;
  --cinza-claro: #f1f5f9;

  /* Cores vibrantes dos discos da Torre de Hanói */
  --disco-1: linear-gradient(135deg, #ff6b6b, #ee5253); /* Vermelho */
  --disco-2: linear-gradient(135deg, #ff9f43, #f39c12); /* Laranja */
  --disco-3: linear-gradient(135deg, #feca57, #f1c40f); /* Amarelo */
  --disco-4: linear-gradient(135deg, #1dd1a1, #10ac84); /* Verde */
  --disco-5: linear-gradient(135deg, #48dbfb, #0abde3); /* Ciano/Azul Céu */
  --disco-6: linear-gradient(135deg, #54a0ff, #2e86de); /* Azul Royal */
  --disco-7: linear-gradient(135deg, #9b59b6, #8e44ad); /* Roxo */
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* ========================================================
   TELAS MODAIS / OVERLAYS (INÍCIO, FIM E AJUDA)
   ======================================================== */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  background: rgba(165, 216, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}

.card-info {
  background: #ffffff;
  border: 6px solid var(--laranja);
  border-radius: 32px;
  padding: 26px 22px;
  max-width: 520px;
  width: min(94vw, 520px);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================================
   MENU INICIAL LÚDICO COMPACTO (PADRÃO NUVITO)
   ======================================================== */
#tela-inicio.overlay {
  overflow-y: auto;
  padding: clamp(16px, 4vh, 36px) 16px;
  background: rgba(80, 154, 220, 0.32);
}

.card-inicio-hanoi {
  position: relative;
  overflow: visible;
  max-height: none !important;
  max-width: 650px;
  width: min(95vw, 650px);
  padding: 24px 28px 22px !important;
  margin: auto;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  border: 3px solid #ffad63;
  box-shadow: 0 20px 55px rgba(27, 65, 105, 0.24);
}

.mascote-menu-hanoi {
  width: 76px;
  height: auto;
  flex: 0 0 76px;
  filter: drop-shadow(0 5px 8px rgba(31, 75, 120, 0.12));
}

@keyframes balancoMascoteHanoi {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(-3deg);
  }
  50% {
    transform: translate(-50%, calc(-50% - 5px)) rotate(3deg);
  }
}

.anim-balanco {
  animation: balancoMascoteHanoi 3.2s infinite ease-in-out;
}

.menu-hanoi-cabecalho {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

/* Cabeçalho */
.menu-hanoi-topo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  min-width: 0;
}

.titulo-menu-hanoi {
  color: #f07828;
  font-size: clamp(1.65rem, 3.8vw, 2rem);
  font-family: 'Fredoka', 'Baloo 2', sans-serif;
  margin: 0 0 4px 0;
  font-weight: 700;
  line-height: 1.15;
}

.subtitulo-menu-hanoi {
  color: #475569;
  font-size: clamp(0.92rem, 2.2vw, 1rem);
  font-weight: 600;
  margin: 0;
  line-height: 1.35;
}

/* Seção de Níveis */
.secao-niveis-hanoi {
  width: 100%;
  margin-bottom: 18px;
  text-align: left;
}

.secao-niveis-titulo {
  margin-bottom: 9px;
  font-weight: 800;
  font-size: 0.98rem;
  color: #17324d;
}

.grade-niveis-hanoi {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.card-nivel-hanoi {
  min-width: 0;
  min-height: 92px;
  background: var(--bg-tema);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 10px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  box-shadow: 0 2px 7px rgba(31, 55, 80, 0.04);
  position: relative;
  user-select: none;
}

.card-nivel-hanoi:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 13px var(--glow-tema);
}

.card-nivel-hanoi:active {
  transform: translateY(0);
}

/* Cores Temáticas dos Níveis */
.nivel-verde {
  --cor-tema: #10ac84;
  --cor-sombra: #0b8a6a;
  --bg-tema: #f0fdf4;
  --glow-tema: rgba(16, 172, 132, 0.25);
}

.nivel-azul {
  --cor-tema: #2f7dff;
  --cor-sombra: #1e5ec7;
  --bg-tema: #eff6ff;
  --glow-tema: rgba(47, 125, 255, 0.25);
}

.nivel-amarelo {
  --cor-tema: #f2c230;
  --cor-sombra: #a87900;
  --bg-tema: #fff9df;
  --glow-tema: rgba(242, 194, 48, 0.25);
}

.nivel-laranja {
  --cor-tema: #f36b62;
  --cor-sombra: #c94c45;
  --bg-tema: #fff0ee;
  --glow-tema: rgba(243, 107, 98, 0.25);
}

.nivel-roxo {
  --cor-tema: #8e44ad;
  --cor-sombra: #6c3483;
  --bg-tema: #faf5ff;
  --glow-tema: rgba(142, 68, 173, 0.25);
}

/* Estado Ativo */
.card-nivel-hanoi.ativo {
  border-color: var(--cor-tema);
  background: var(--bg-tema);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(31, 55, 80, 0.08);
}

.card-nivel-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #475569;
  background: rgba(255, 255, 255, 0.72);
  padding: 2px 7px;
  border-radius: 999px;
  margin-bottom: 7px;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.card-nivel-hanoi.ativo .card-nivel-badge {
  color: var(--cor-sombra);
  background: #ffffff;
}

.card-nivel-nome {
  font-size: clamp(0.82rem, 1.6vw, 0.96rem);
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  line-height: 1.1;
  transition: color 0.14s ease;
}

.card-nivel-hanoi.ativo .card-nivel-nome {
  color: var(--cor-sombra);
}

.meta-movs {
  font-size: 0.64rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
}

/* Ações Inferiores (Botões 3D Compactos) */
.menu-hanoi-acoes {
  width: 100%;
}

.btn-jogar-hanoi {
  width: 100%;
  background: linear-gradient(180deg, #35cf78, #20ad5c);
  color: #ffffff;
  border: none;
  border-bottom: 4px solid #168747;
  border-radius: 16px;
  padding: 14px 20px;
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 5px 14px rgba(32, 173, 92, 0.24);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
  margin-bottom: 8px;
}

.btn-jogar-hanoi:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 18px rgba(32, 173, 92, 0.32);
  background: linear-gradient(180deg, #44db85, #27bd68);
}

.btn-jogar-hanoi:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: 0 2px 6px rgba(32, 173, 92, 0.2);
}

.anim-pulso-btn {
  animation: pulsoBotaoJogar 2.4s infinite ease-in-out;
}

.anim-pulso-btn:hover {
  animation: none;
}

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

.menu-hanoi-acoes-secundarias {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.btn-como-jogar-menu {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #dce5ee;
  border-radius: 12px;
  padding: 8px 12px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.14s, box-shadow 0.14s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: none;
}

.btn-como-jogar-menu:hover {
  background: #edf4fb;
}

.btn-como-jogar-menu:active {
  transform: translateY(1.5px);
}

.btn-voltar-portal-menu {
  background: #f8fafc;
  color: #475569;
  text-decoration: none;
  border: 1px solid #dce5ee;
  border-radius: 12px;
  padding: 8px 12px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.14s, box-shadow 0.14s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: none;
}

.btn-voltar-portal-menu:hover {
  background: #edf4fb;
}

.btn-voltar-portal-menu:active {
  transform: translateY(1.5px);
}

@media (max-width: 500px) {
  .card-inicio-hanoi {
    padding: 18px 15px 16px !important;
  }
  .mascote-menu-hanoi {
    width: 58px;
    flex-basis: 58px;
  }
  .menu-hanoi-cabecalho {
    gap: 11px;
    margin-bottom: 15px;
  }
  .menu-hanoi-topo {
    text-align: left;
  }
  .grade-niveis-hanoi {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
  }
  .card-nivel-hanoi {
    grid-column: span 2;
    min-height: 86px;
    padding: 9px 3px;
  }
  .card-nivel-hanoi:nth-child(4) {
    grid-column: 2 / span 2;
  }
  .card-nivel-hanoi:nth-child(5) {
    grid-column: 4 / span 2;
  }
  .card-nivel-nome {
    font-size: 0.83rem;
  }
  .meta-movs {
    font-size: 0.58rem;
  }
  .hanoi-status-bar {
    padding: 6px 8px;
    gap: 6px;
  }
  .hanoi-metricas {
    gap: 6px;
  }
  .metrica-item {
    font-size: 0.8rem;
  }
  .metrica-destaque {
    font-size: 0.96rem;
  }
  .btn-hanoi-acao {
    padding: 5px 7px;
    font-size: 0.74rem;
    gap: 3px;
  }
  .badge-vitoria-info {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 8px 6px;
  }
  .vitoria-stat-card {
    padding: 6px 3px;
  }
  .vitoria-stat-valor {
    font-size: 1.15rem;
  }
}

@media (max-height: 640px) {
  #tela-inicio.overlay {
    padding-top: 12px;
    justify-content: flex-start;
  }
  .card-inicio-hanoi {
    padding-top: 18px !important;
  }
}

.texto-destaque {
  font-family: 'Fredoka', 'Baloo 2', sans-serif;
  line-height: 1.2;
}

/* ========================================================
   BARRA SUPERIOR (TOPO DO JOGO)
   ======================================================== */
.topo {
  width: 100%;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.95);
  z-index: 20;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  position: relative;
  flex-shrink: 0;
}

.grupo-esq {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.centro-topo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

.modo-pill {
  pointer-events: auto;
  background: #eef4ff;
  color: var(--azul-escuro);
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 5px 14px;
  border-radius: 20px;
  border: 2px solid #c7dcff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(47, 125, 255, 0.08);
}

.modo-pill b {
  color: var(--azul-escuro);
}

.lado-dir {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  z-index: 2;
}

.btn-sair, .btn-modo, .btn-ajuda-topo {
  text-decoration: none;
  color: #fff;
  padding: 7px 14px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: 'Fredoka', sans-serif;
  transition: transform 0.12s, box-shadow 0.12s;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-sair {
  background: var(--vermelho);
  box-shadow: 0 3px 0 var(--vermelho-escuro);
}
.btn-sair:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--vermelho-escuro);
}

.btn-modo {
  background: var(--azul-escuro);
  box-shadow: 0 3px 0 #1b5edb;
}
.btn-modo:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #1b5edb;
}

.btn-ajuda-topo {
  background: #f1c40f;
  color: #5c4300;
  box-shadow: 0 3px 0 #d4ac0d;
}
.btn-ajuda-topo:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #d4ac0d;
}

.status-topo {
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  color: #1e293b;
  background: transparent;
  padding: 4px 6px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.status-topo #rec-movs {
  color: #d97706;
  font-weight: 800;
  font-size: 1.15rem;
}

@media (max-width: 768px) {
  .topo {
    padding: 6px 10px;
  }
  .grupo-esq, .lado-dir {
    gap: 4px;
  }
  .btn-sair, .btn-modo, .btn-ajuda-topo {
    padding: 5px 8px;
    font-size: 0.78rem;
  }
  .centro-topo {
    position: static;
    transform: none;
    display: flex !important;
    justify-content: center;
    flex: 1;
    min-width: 0;
  }
  .modo-pill {
    padding: 3px 8px;
    font-size: 0.76rem;
    gap: 4px;
  }
  .status-topo {
    padding: 2px 4px;
    font-size: 0.95rem;
    border: none;
    background: transparent;
    box-shadow: none;
  }
}

@media (max-width: 540px) {
  .btn-txt-mobile {
    display: none;
  }
  .btn-sair, .btn-modo, .btn-ajuda-topo {
    padding: 6px 8px;
    font-size: 0.95rem;
  }

}

/* ========================================================
   PAINEL PRINCIPAL DO JOGO
   ======================================================== */
.painel-jogo {
  width: min(96vw, 860px);
  margin: auto;
  z-index: 2;
  background: #ffffff;
  border-radius: 28px;
  padding: 16px 18px 20px;
  box-shadow: 0 12px 35px rgba(31, 42, 68, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  border: 4px solid rgba(47, 125, 255, 0.15);
  max-height: calc(100svh - 75px);
  min-height: 480px;
  justify-content: space-between;
}

@media (min-height: 700px) {
  .painel-jogo {
    padding: 20px 24px 26px;
  }
}

/* ========================================================
   SELETOR DE DISCOS (LIVRE ESCOLHA 3 A 7)
   ======================================================== */
.seletor-dificuldade {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-bottom: 8px;
}

.seletor-titulo {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  margin-right: 4px;
}

.pill-disco {
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pill-disco:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.pill-disco.ativo {
  background: var(--azul-escuro);
  color: #ffffff;
  border-color: #1b5edb;
  box-shadow: 0 3px 0 #1b5edb;
  transform: translateY(-1px);
}

/* ========================================================
   BARRA DE STATUS E FERRAMENTAS DO JOGO
   ======================================================== */
.hanoi-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  padding: 6px 12px;
  background: #f8fafc;
  border-radius: 18px;
  border: 2px dashed rgba(47, 125, 255, 0.2);
  margin-bottom: 8px;
}

.hanoi-metricas {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.metrica-item {
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.metrica-destaque {
  color: var(--azul-escuro);
  font-size: 1.15rem;
}

.metrica-meta {
  color: #64748b;
  font-size: 0.85rem;
}

.hanoi-acoes {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-hanoi-acao {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  color: #334155;
  padding: 6px 11px;
  border-radius: 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 0 #cbd5e1;
}

.btn-hanoi-acao:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.btn-hanoi-acao:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: none;
}

.btn-hanoi-acao:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-dica-nuvito {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
  box-shadow: 0 2px 0 #fde68a;
}
.btn-dica-nuvito:hover:not(:disabled) {
  background: #fef3c7;
  border-color: #f59e0b;
}

/* ========================================================
   BALÃO DE DICA DO NUVITO / FEEDBACK GUIA VIVO
   ======================================================== */
.hanoi-nuvito-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
}

.hanoi-nuvito-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 3px solid var(--azul-claro, #2f7dff);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(47, 125, 255, 0.25);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
}

.hanoi-nuvito-avatar-wrap:hover {
  transform: scale(1.1) rotate(4deg);
  box-shadow: 0 6px 14px rgba(47, 125, 255, 0.4);
}

.hanoi-nuvito-avatar {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.hanoi-nuvito-avatar-wrap.falando {
  border-color: var(--verde, #2ed573);
  box-shadow: 0 0 0 4px rgba(46, 213, 115, 0.3);
}

.hanoi-nuvito-avatar-wrap.falando .hanoi-nuvito-avatar {
  animation: pulsoNuvitoFalando 1.2s ease-in-out infinite alternate;
}

@keyframes pulsoNuvitoFalando {
  0% { transform: scale(1) translateY(0); }
  100% { transform: scale(1.18) translateY(-3px) rotate(5deg); }
}

.nuvito-som-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 0.72rem;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.hanoi-feedback-box {
  flex: 1;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
  text-align: left;
  padding: 6px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 2px solid #bfdbfe;
  box-shadow: 0 2px 8px rgba(47, 125, 255, 0.08);
  transition: all 0.25s ease;
  position: relative;
}

.hanoi-feedback-box::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 9px solid #bfdbfe;
}

.hanoi-feedback-box::after {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid #ffffff;
}

.hanoi-feedback-box.alerta {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  animation: shake 0.4s ease;
}
.hanoi-feedback-box.alerta::before { border-right-color: #fecaca; }
.hanoi-feedback-box.alerta::after { border-right-color: #fef2f2; }

.hanoi-feedback-box.dica {
  background: #fefce8;
  border-color: #fde047;
  color: #854d0e;
}
.hanoi-feedback-box.dica::before { border-right-color: #fde047; }
.hanoi-feedback-box.dica::after { border-right-color: #fefce8; }

.hanoi-feedback-box.sucesso {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}
.hanoi-feedback-box.sucesso::before { border-right-color: #86efac; }
.hanoi-feedback-box.sucesso::after { border-right-color: #f0fdf4; }

/* ========================================================
   TABULEIRO DA TORRE DE HANÓI (MESA E PINOS)
   ======================================================== */
.hanoi-board-container {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  padding-bottom: 6px;
  min-height: 240px;
}

.hanoi-board {
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  position: relative;
  z-index: 2;
  padding: 0 6px;
}

/* Cada uma das 3 colunas dos pinos */
.hanoi-peg-col {
  flex: 1;
  max-width: 250px;
  height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
  padding: 0 4px;
  user-select: none;
  touch-action: manipulation;
}

.hanoi-peg-col:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
  border-radius: 18px 18px 0 0;
}

@media (min-height: 700px) {
  .hanoi-peg-col {
    height: 260px;
  }
}

/* Zona de destaque de toque */
.hanoi-peg-col::before {
  content: "";
  position: absolute;
  inset: -6px -2px 0 -2px;
  background: transparent;
  border-radius: 18px 18px 0 0;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  z-index: 0;
}

.hanoi-peg-col:hover::before {
  background: rgba(47, 125, 255, 0.04);
  border-color: transparent;
}

.hanoi-peg-col.drag-hover::before {
  background: rgba(46, 204, 113, 0.18) !important;
  border-color: #2ecc71 !important;
  border-style: solid !important;
  transform: scale(1.02);
}

.hanoi-peg-col.selecionado::before {
  background: rgba(46, 204, 113, 0.1);
  border-color: #2ecc71;
}

.hanoi-peg-col.mini-tutorial-destino::before {
  background: rgba(47, 125, 255, 0.12);
  border-color: #2f7dff;
  box-shadow: 0 0 14px rgba(47, 125, 255, 0.2);
}

.hanoi-peg-col.mini-tutorial-destino::after {
  content: '👇';
  position: absolute;
  top: -30px;
  left: 50%;
  z-index: 10;
  font-size: 28px;
  line-height: 1;
  pointer-events: none;
  transform: translateX(-50%);
  animation: miniTutorialApontarPino 0.8s ease-in-out infinite alternate;
}

/* A Haste / Barra Vertical do Pino */
.hanoi-rod {
  position: absolute;
  bottom: 0;
  width: 14px;
  height: 82%;
  background: linear-gradient(90deg, #d4a373, #faedcd 45%, #c58f58);
  border-radius: 8px 8px 0 0;
  box-shadow: inset 1px 0 2px rgba(255, 255, 255, 0.6),
              inset -1px 0 2px rgba(0, 0, 0, 0.2),
              2px 2px 6px rgba(0, 0, 0, 0.12);
  z-index: 1;
  pointer-events: none;
}

/* Pilha de Discos no Pino */
.hanoi-disks-stack {
  width: 100%;
  display: flex;
  flex-direction: column-reverse; /* Empilha de baixo para cima */
  align-items: center;
  z-index: 3;
  margin-bottom: 2px;
}

/* Base de Madeira horizontal que une os 3 pinos */
.hanoi-wood-base {
  width: 100%;
  height: 24px;
  background: linear-gradient(180deg, #e0a96d 0%, #b87b41 70%, #8c5928 100%);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(74, 44, 14, 0.25),
              inset 0 2px 2px rgba(255, 255, 255, 0.5),
              inset 0 -2px 3px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

/* Rótulos dos Pinos (A, B, C) */
.hanoi-peg-labels {
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 8px;
  z-index: 5;
}

.peg-label-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: #475569;
}

.peg-label-badge {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  padding: 2px 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  color: var(--azul-escuro);
}

.peg-label-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}

/* ========================================================
   DISCOS DA TORRE DE HANÓI (ESTILIZAÇÃO 3D SUAVE)
   ======================================================== */
.hanoi-disk {
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.18),
              inset 0 2px 3px rgba(255, 255, 255, 0.6),
              inset 0 -2px 3px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2), box-shadow 0.22s ease;
  user-select: none;
  cursor: grab;
  margin-top: 1px;
}

@media (min-height: 700px) {
  .hanoi-disk {
    height: 32px;
    font-size: 1.05rem;
  }
}

/* Larguras proporcionais dos discos de 1 a 7 */
.disk-size-1 { width: 34%; background: var(--disco-1); }
.disk-size-2 { width: 44%; background: var(--disco-2); }
.disk-size-3 { width: 55%; background: var(--disco-3); color: #422006; text-shadow: none; }
.disk-size-4 { width: 66%; background: var(--disco-4); }
.disk-size-5 { width: 77%; background: var(--disco-5); }
.disk-size-6 { width: 88%; background: var(--disco-6); }
.disk-size-7 { width: 98%; background: var(--disco-7); }

.hanoi-disk.mini-tutorial-disco::after {
  content: '👇';
  position: absolute;
  top: -29px;
  right: -12px;
  z-index: 20;
  font-size: 25px;
  line-height: 1;
  pointer-events: none;
  animation: miniTutorialApontarDisco 0.8s ease-in-out infinite alternate;
}

/* Disco Selecionado (Levitando no topo do pino com altura proporcional segura) */
.hanoi-disk.selecionado {
  transform: translateY(clamp(-36px, -5vh, -24px)) scale(1.04);
  box-shadow: 0 14px 22px rgba(0, 0, 0, 0.22),
              0 0 0 3px #ffffff,
              0 0 12px rgba(47, 125, 255, 0.6);
  cursor: grabbing;
  z-index: 10;
  animation: levitarDisco 1.2s infinite ease-in-out alternate;
}

/* Disco sendo arrastado com o dedo ou mouse */
.hanoi-disk.arrastando {
  cursor: grabbing !important;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.3),
              0 0 0 3px #ffffff,
              0 0 14px rgba(47, 125, 255, 0.7) !important;
  transition: none !important;
  z-index: 100 !important;
  will-change: transform;
}

/* Animação de tremor ao tentar movimento ilegal */
.hanoi-disk.invalido {
  animation: shake 0.4s ease !important;
}

/* Animação comemorativa dos discos na vitória */
.hanoi-disk.vitoria {
  animation: bounceVitoria 0.6s infinite alternate;
}

/* ========================================================
   MODAL DE VITÓRIA (PADRÃO LÚDICO NUVITO)
   ======================================================== */
.modal-vitoria-card {
  max-width: 480px;
  width: min(92vw, 480px);
  padding: 24px 22px 28px !important;
  text-align: center;
  position: relative;
  overflow: visible;
}

.vitoria-mascote-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 6px;
  height: 95px;
}

.vitoria-mascote-img {
  width: 95px;
  height: 90px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.16));
  animation: pularVitoriaHanoi 2s infinite ease-in-out;
  transform-origin: 50% 90%;
}

@keyframes pularVitoriaHanoi {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.06) translateY(-8px); }
}

.badge-vitoria-info {
  background: #f8fafc;
  border-radius: 20px;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  margin: 10px 0 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.vitoria-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: #ffffff;
  padding: 8px 6px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.vitoria-stat-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vitoria-stat-valor {
  font-size: 1.35rem;
  color: var(--azul-escuro);
  font-family: 'Fredoka', sans-serif;
  line-height: 1.15;
}

.vitoria-stat-sub {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.vitoria-recorde-badge {
  background: #fef08a;
  color: #854d0e;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 8px;
  border: 1px solid #facc15;
  animation: pulsoRecorde 1.2s infinite ease-in-out;
  margin-top: 2px;
}

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

/* ========================================================
   GRUPO DE BOTÕES PADRONIZADOS DA VITÓRIA
   ======================================================== */
.vitoria-botoes-grupo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
}

.btn-vitoria-padrao {
  min-width: 0;
  min-height: 54px;
  padding: 8px 12px;
  border-radius: 16px !important;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  user-select: none;
}

.btn-vitoria-padrao:last-child {
  grid-column: 1 / -1;
}

.btn-vitoria-verde {
  background: var(--verde, #2ecc71);
  color: #ffffff;
  box-shadow: 0 3px 0 #27ae60;
}
.btn-vitoria-verde:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #27ae60;
  filter: brightness(1.05);
}
.btn-vitoria-verde:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 #27ae60;
}

.btn-vitoria-azul {
  background: var(--azul-escuro, #2f7dff);
  color: #ffffff;
  box-shadow: 0 3px 0 #1b5edb;
}
.btn-vitoria-azul:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #1b5edb;
  filter: brightness(1.05);
}
.btn-vitoria-azul:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 #1b5edb;
}

.btn-vitoria-laranja {
  background: #ff8533;
  color: #ffffff;
  box-shadow: 0 3px 0 #d96818;
}
.btn-vitoria-laranja:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #d96818;
  filter: brightness(1.05);
}
.btn-vitoria-laranja:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 #d96818;
}

@media (max-width: 480px) {
  .vitoria-botoes-grupo {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .btn-vitoria-padrao:last-child {
    grid-column: auto;
  }
  .btn-vitoria-padrao {
    width: 100%;
    min-height: 48px;
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

/* ========================================================
   KEYFRAME ANIMATIONS
   ======================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes levitarDisco {
  from { transform: translateY(-45px) scale(1.05); }
  to { transform: translateY(-52px) scale(1.05); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

@keyframes bounceVitoria {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

@keyframes miniTutorialApontarDisco {
  from { transform: translateY(0); }
  to { transform: translateY(5px); }
}

@keyframes miniTutorialApontarPino {
  from { transform: translate(-50%, 0); }
  to { transform: translate(-50%, 5px); }
}

/* ========================================================
   CONTROLES FLUTUANTES (SOM, MÚSICA, FULLSCREEN)
   PADRÃO OFICIAL NUVITO (EM PÉ / VERTICAL)
   ======================================================== */
.floating-controls {
  position: absolute;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.botoes-secundarios {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-circular {
  width: 40px;
  height: 40px;
  border-radius: 50% !important;
  border: 2.5px solid #ffffff !important;
  cursor: pointer;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16) !important;
  background: #ffffff;
  color: #4b5563;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, box-shadow 0.2s, color 0.2s;
}

.btn-circular:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22) !important;
}

.btn-circular:active {
  transform: scale(0.92);
}

/* ========================================================
   CORES PADRONIZADAS OFICIAIS NUVITO
   ======================================================== */
/* Tela Cheia: Roxo / Lilás oficial Nuvito */
#btn-fullscreen {
  background: #8e7df0 !important;
  color: #ffffff !important;
}

/* Música: Laranja Nuvito quando ativo */
#btn-musica.ativo {
  background: #ff8533 !important;
  color: #ffffff !important;
}
#btn-musica:not(.ativo),
#btn-musica.inativo {
  background: #ffffff !important;
  color: #4b5563 !important;
}

/* Som / Narração: Verde Nuvito quando ativo */
#btn-som.ativo {
  background: #2ecc71 !important;
  color: #ffffff !important;
}
#btn-som:not(.ativo),
#btn-som.inativo {
  background: #ffffff !important;
  color: #4b5563 !important;
}

/* Engrenagem: Azul Nuvito oficial */
#btn-config {
  display: none;
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35) !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}

#btn-config.ativo {
  transform: rotate(45deg);
  background: #1d4ed8 !important;
}

/* ========================================================
   COMPORTAMENTO RESPONSIVO DAS TELAS
   ======================================================== */
/* Telas Maiores (> 1024px - Desktop, Laptops, Mac):
   A engrenagem NÃO fica ativada! Os botões ficam diretamente visíveis em coluna vertical ("em pé / pra cima") */
@media (min-width: 1025px) {
  .floating-controls {
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: calc(20px + env(safe-area-inset-right));
  }

  #btn-config {
    display: none !important;
  }

  .botoes-secundarios {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
}

/* Telas Menores (<= 1024px - Tablets e Mobile):
   Engrenagem compacta no canto. Ao clicar, abre o menu secundário vertical para cima */
@media (max-width: 1024px) {
  #btn-config {
    display: inline-flex !important;
  }

  .botoes-secundarios {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px) scale(0.9);
    position: absolute;
    bottom: 100%;
    margin-bottom: 8px;
    right: 0;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
  }

  .botoes-secundarios.mostrar {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
  }
}

/* ========================================================
   INDICADOR DE SCROLL ("SAIBA MAIS") OFICIAL NUVITO
   (Centralizado, como nos outros jogos)
   ======================================================== */
.scroll-indicator {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 50;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
  animation: floatScrollHanoi 3s infinite ease-in-out;
  transition: opacity 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.scroll-indicator:hover {
  color: #ffffff;
  opacity: 0.9;
  transform: translateX(-50%) translateY(-2px);
}

.scroll-indicator svg {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

@keyframes floatScrollHanoi {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(5px); }
}

@media (max-width: 768px) {
  .scroll-indicator {
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 50%;
    font-size: 0.95rem;
    color: #ffffff;
  }
  .scroll-indicator svg {
    width: 17px;
    height: 17px;
    stroke: #ffffff;
  }
}

/* ========================================================
   MODAL TUTORIAL COMO JOGAR (PADRÃO LÚDICO NUVITO)
   ======================================================== */
.tut-caixa-modal {
  background: #ffffff;
  border: 5px solid var(--azul-escuro);
  border-radius: 28px;
  width: min(480px, 94vw);
  max-height: calc(100svh - 24px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  padding: 16px 14px 14px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  animation: popIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tut-topo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tut-mascote-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.tut-nuvito-img {
  width: 44px;
  height: auto;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
  flex-shrink: 0;
}

.tut-titulos {
  display: flex;
  flex-direction: column;
}

.tut-titulo-principal {
  font-size: 1.25rem;
  color: var(--azul-escuro);
  margin: 0;
  font-weight: 800;
  line-height: 1.15;
  font-family: 'Fredoka', 'Baloo 2', sans-serif;
}

.tut-subtitulo {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
}

.tut-btn-ouvir,
.tut-btn-fechar {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1rem;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, background 0.15s;
}

.tut-btn-ouvir {
  color: #10ac84;
}

.tut-btn-ouvir.falando {
  background: #dcfce7 !important;
  color: #15803d !important;
  animation: pulsoFalando 0.9s infinite alternate ease-in-out;
}

@keyframes pulsoFalando {
  from { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  to { transform: scale(1.15); box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

.tut-btn-ouvir:hover,
.tut-btn-fechar:hover {
  background: #e2e8f0;
  transform: scale(1.08);
}

/* Navegação de Abas */
.tut-abas-nav {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 50px;
}

.tut-aba-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 7px 4px;
  border-radius: 50px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: 'Fredoka', sans-serif;
  white-space: nowrap;
}

.tut-aba-btn.ativa {
  background: var(--azul-escuro);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(47, 125, 255, 0.35);
}

/* Painel de Conteúdo das Abas */
.tut-painel-aba {
  display: flex;
  flex-direction: column;
  gap: 9px;
  animation: tutFadeIn 0.22s ease-out;
}

@keyframes tutFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Demonstração Comparativa (Aba 1) */
.tut-demo-comparacao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 16px;
  padding: 10px 8px;
}

.tut-regra-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  max-width: 160px;
}

.tut-regra-card.correta {
  border-color: #86efac;
  background: #f0fdf4;
}

.tut-regra-card.errada {
  border-color: #fca5a5;
  background: #fef2f2;
}

.tut-mini-pino {
  position: relative;
  width: 75px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 5px;
}

.tut-haste-mock {
  position: absolute;
  bottom: 5px;
  width: 6px;
  height: 40px;
  background: #d79a5b;
  border-radius: 4px 4px 0 0;
  z-index: 1;
}

.tut-base-mock {
  position: absolute;
  bottom: 0;
  width: 70px;
  height: 5px;
  background: #8b5a2b;
  border-radius: 3px;
  z-index: 1;
}

.tut-mini-disco {
  height: 8px;
  border-radius: 4px;
  z-index: 2;
  margin-bottom: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tut-mini-disco.tam-1 {
  width: 26px;
  background: #ee5253;
}

.tut-mini-disco.tam-2 {
  width: 42px;
  background: #f39c12;
}

.tut-mini-disco.tam-3 {
  width: 58px;
  background: #2e86de;
}

.tut-vs-divisor {
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  color: #94a3b8;
}

.tut-regra-tag {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  font-family: 'Fredoka', sans-serif;
}

.tut-regra-tag.ok {
  background: #22c55e;
  color: #ffffff;
}

.tut-regra-tag.erro {
  background: #ef4444;
  color: #ffffff;
}

.tut-regra-card small {
  font-size: 0.66rem;
  color: #64748b;
  font-weight: 700;
}

/* Grid de Passos (Abas 2 e 3) */
.tut-passos-mover-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
}

.tut-passo-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.tut-passo-icone {
  font-size: 1.3rem;
  line-height: 1;
}

.tut-passo-card b {
  font-size: 0.74rem;
  color: #1e293b;
  font-family: 'Fredoka', sans-serif;
}

.tut-passo-card small {
  font-size: 0.65rem;
  color: #64748b;
  line-height: 1.25;
}

/* Cards Informativos */
.tut-card-info {
  background: #f8fafc;
  border-radius: 14px;
  padding: 8px 12px;
  text-align: left;
}

.tut-card-info h3 {
  margin: 0 0 2px 0;
  font-size: 0.86rem;
  color: #1e293b;
  font-weight: 800;
  font-family: 'Fredoka', sans-serif;
}

.tut-card-info p {
  margin: 0;
  font-size: 0.77rem;
  color: #475569;
  line-height: 1.32;
}

.tut-card-info.nuvito-dica {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
}

.tut-card-info.nuvito-dica h3 {
  color: #16a34a;
}

/* Botão Rodapé */
.tut-rodape-modal {
  width: 100%;
  margin-top: 2px;
}

.btn-jogar-tutorial {
  width: 100%;
  background: #2ecc71;
  color: #ffffff;
  border: none;
  border-bottom: 4px solid #219653;
  border-radius: 50px;
  padding: 10px 18px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.14s ease;
  box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
}

.btn-jogar-tutorial:hover {
  background: #34d37c;
  transform: translateY(-1px);
}

.btn-jogar-tutorial:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

/* Ajustes finais para caber melhor em telas de celular */
@media (max-width: 540px) {
  .hanoi-nuvito-banner {
    display: none;
  }

  .seletor-dificuldade {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 5px;
    margin-bottom: 6px;
  }

  .seletor-titulo {
    margin-right: 0;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  .pill-disco {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 5px 3px;
    font-size: 0.9rem;
  }

  .pill-unidade {
    display: none;
  }

  .hanoi-status-bar {
    justify-content: center;
    gap: 0;
    padding: 4px;
    margin-bottom: 6px;
    border-radius: 13px;
  }

  .hanoi-metricas {
    display: none;
  }

  .hanoi-acoes {
    width: 100%;
    gap: 6px;
  }

  .btn-hanoi-acao {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
    padding: 6px 4px;
    font-size: 0.78rem;
    gap: 3px;
  }
}

/* Modo compacto para celular na horizontal */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 950px) {
  .topo {
    padding: 3px 8px;
  }

  .painel-jogo {
    width: min(94vw, 740px);
    height: calc(100svh - 44px);
    max-height: calc(100svh - 44px);
    min-height: 0;
    padding: 5px 12px 7px;
    border-radius: 18px;
  }

  .seletor-dificuldade {
    gap: 4px;
    margin-bottom: 3px;
  }

  .pill-disco {
    padding: 3px 8px;
    font-size: 0.75rem;
  }

  .hanoi-status-bar {
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 12px;
  }

  .hanoi-metricas {
    gap: 5px;
  }

  .metrica-item {
    font-size: 0.75rem;
  }

  .metrica-destaque {
    font-size: 0.9rem;
  }

  .hanoi-acoes {
    gap: 4px;
  }

  .btn-hanoi-acao {
    padding: 4px 6px;
    font-size: 0.7rem;
    gap: 3px;
  }

  .hanoi-nuvito-banner {
    display: none;
  }

  .hanoi-board-container {
    min-height: 0;
    padding-bottom: 2px;
  }

  .hanoi-board {
    flex: 1;
    min-height: 0;
  }

  .hanoi-peg-col {
    height: clamp(112px, 38svh, 165px);
  }

  .hanoi-rod {
    width: 10px;
  }

  .hanoi-disk {
    height: clamp(14px, 4svh, 20px);
    font-size: clamp(0.65rem, 1.9svh, 0.85rem);
  }

  .hanoi-wood-base {
    height: 18px;
  }

  .hanoi-peg-labels {
    margin-top: 4px;
  }

  .peg-label-badge {
    padding: 1px 6px;
    font-size: 0.78rem;
  }

  .peg-label-sub,
  .scroll-indicator {
    display: none;
  }
}
