/* Estilos Visuais para o Google Blockly Puzzle: Padrões e Inteligência Artificial */

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

:root {
  --primary: #4F46E5;
  --bg-color: #F8FAFC;
}

body, html {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Nunito', 'Fredoka', sans-serif;
  background-color: var(--bg-color);
  user-select: none;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Espaço do Workspace Oficial do Google Blockly */
#blocklyArea {
  width: 100%;
  height: 100%;
  position: relative;
}

#blocklyDiv {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.blocklySvg {
  background-color: #FAFAFA !important;
}

/* TIPOGRAFIA APRIMORADA DO GOOGLE BLOCKLY (LEVE, NÍTIDA E PROPORCIONAL) */
.blocklyText {
  font-family: 'Nunito', sans-serif !important;
  font-weight: 700 !important;
  font-size: 11.2pt !important;
  letter-spacing: 0.2px !important;
  fill: #FFFFFF !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.blocklyDropdownText {
  font-family: 'Nunito', sans-serif !important;
  font-weight: 700 !important;
  font-size: 10.5pt !important;
  fill: #0F172A !important;
}

.blocklyMenu, .blocklyMenuItem {
  font-family: 'Nunito', sans-serif !important;
  font-weight: 700 !important;
  font-size: 11pt !important;
}

/* Luz Guia / Highlight para Blocos que precisam de atenção */
.blockly-hint-glow > .blocklyPath {
  animation: hintPulseGlow 1.5s infinite ease-in-out !important;
  stroke: #F59E0B !important;
  stroke-width: 4px !important;
}

@keyframes hintPulseGlow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4)); stroke: #F59E0B; }
  50% { filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.9)); stroke: #EF4444; }
}

/* Botões Infantis */
.kid-btn {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

.kid-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.08);
}

.kid-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

/* Animações */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(1deg); }
}

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

@keyframes brainPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.9)); }
}

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

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pop-in {
  animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animate-brain {
  animation: brainPulse 2s infinite ease-in-out;
}

.animate-shake {
  animation: shake 0.4s ease-in-out;
}

/* Modal Backdrop */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

/* Scrollbar suave para seletores */
::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}
