/* Animações e Transições Globais */

@keyframes float {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -50px) rotate(5deg); }
  66% { transform: translate(-20px, 20px) rotate(-5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

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

.animate-float-delayed {
  animation: float 20s ease-in-out infinite reverse;
}

@keyframes shine {
  0% { left: -100%; transition: all 0.75s ease-in; }
  100% { left: 100%; transition: all 0.75s ease-in; }
}

.animate-shine {
  position: relative;
  overflow: hidden;
}

.animate-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-25deg);
  animation: shine 3s infinite;
  pointer-events: none;
}

@keyframes entranceCard {
  0% { opacity: 0; transform: translateY(30px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.animate-entrance-card {
  animation: entranceCard 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Delays escalonados para animação de entrada */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }

/* Animação para linhas de tabela e itens de lista */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slide-in-right {
  animation: slideInRight 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Transições e Efeitos de Interação */
.hover-scale {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-scale:hover {
  transform: scale(1.02);
}

.hover-lift {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.active-shrink {
  transition: var(--transition);
}

.active-shrink:active {
  transform: scale(0.97);
}

/* Animação Flip de Flashcards 3D */
.card-container {
  perspective: 1500px;
}

.card-inner {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.card-inner.is-flipped {
  transform: rotateY(180deg);
}

.card-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-back {
  transform: rotateY(180deg);
}

/* Efeito de digitação animado para a Lila AI */
@keyframes typingPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.typing-dot {
  animation: typingPulse 1s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 200ms;
}

.typing-dot:nth-child(3) {
  animation-delay: 400ms;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-in {
  animation: scaleIn 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin-slow {
  animation: spin-slow 8s linear infinite;
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.animate-slide-down {
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
  0% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.95);
  }
}

.animate-slide-up {
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- Estilos do Canvas de Mapa Mental e Drawer Recolhível --- */
:root {
  --drawer-width: 340px;
  --drawer-transition: 280ms cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 140px;
}

#mindmap-container-layout {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  gap: 2rem;
}

#mindmap-drawer {
  width: 100%;
  transition: transform var(--drawer-transition), margin-right var(--drawer-transition), opacity var(--drawer-transition);
  z-index: 40;
}

#mindmap-canvas-wrapper {
  width: 100%;
  transition: width var(--drawer-transition), border-radius var(--drawer-transition);
  z-index: 10;
}

#mindmap-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.35);
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--drawer-transition);
  backdrop-filter: blur(2px);
}

#mindmap-minimap {
  transition: left var(--drawer-transition);
}

@media (min-width: 1024px) {
  #mindmap-container-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  #mindmap-drawer {
    width: var(--drawer-width);
  }

  /* Drawer aberto empurra o canvas */
  #mindmap-container-layout.drawer-open #mindmap-drawer {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* Drawer fechado - recolhe e move margem para não ocupar espaço */
  #mindmap-container-layout.drawer-closed #mindmap-drawer {
    transform: translateX(-110%);
    opacity: 0;
    pointer-events: none;
    margin-right: calc(-1 * var(--drawer-width) - 2rem);
  }

  #mindmap-container-layout.drawer-closed #mindmap-canvas-wrapper {
    width: 100%;
    border-radius: 8px !important;
  }
}

/* Tablet e Mobile (Overlay e drawer absoluto por cima) */
@media (max-width: 1023px) {
  #mindmap-drawer {
    position: absolute;
    top: 0;
    left: 0;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    width: var(--drawer-width);
    max-width: 100%;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  }

  #mindmap-container-layout.drawer-closed #mindmap-drawer {
    transform: translateX(-110%);
    opacity: 0;
    pointer-events: none;
  }

  #mindmap-container-layout.drawer-open #mindmap-drawer {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* Exibe overlay escuro em tablet/mobile */
  #mindmap-container-layout.drawer-open #mindmap-drawer-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* Minimapa empurrado se drawer aberto */
  #mindmap-container-layout.drawer-open #mindmap-minimap {
    left: 356px !important;
  }
}

/* Estilos Fullscreen */
#mindmap-container-area.is-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  background-color: #0f172a !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 9999 !important;
}

/* --- Liquid Glass Hover e Active nos Cards da Dashboard --- */
#section-dashboard .glass-metric-amber,
#section-dashboard .glass-metric-primary,
#section-dashboard .glass-metric-purple,
#section-dashboard .glass-metric-red,
#section-dashboard .liquid-glass-amber,
#btn-pomo-desempenho-dash,
#section-dashboard .liquid-glass {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition:
    background 300ms ease,
    border-color 300ms ease,
    box-shadow 300ms ease,
    backdrop-filter 300ms ease,
    -webkit-backdrop-filter 300ms ease,
    transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Reflexo interno padrão (brilho sutil estático) */
#section-dashboard .glass-metric-amber::before,
#section-dashboard .glass-metric-primary::before,
#section-dashboard .glass-metric-purple::before,
#section-dashboard .glass-metric-red::before,
#section-dashboard .liquid-glass-amber::before,
#btn-pomo-desempenho-dash::before,
#section-dashboard .liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
  opacity: 1;
  transition: opacity 300ms ease;
  pointer-events: none;
  z-index: 0;
}

/* Brilho dinâmico que segue o mouse */
#section-dashboard .glass-metric-amber::after,
#section-dashboard .glass-metric-primary::after,
#section-dashboard .glass-metric-purple::after,
#section-dashboard .glass-metric-red::after,
#section-dashboard .liquid-glass-amber::after,
#btn-pomo-desempenho-dash::after,
#section-dashboard .liquid-glass::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.18) 0%,
    transparent 70%
  );
  left: var(--mouse-x, 50%);
  top: var(--mouse-y, 50%);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 1;
}

/* Estado de Hover */
#section-dashboard .glass-metric-amber:hover,
#section-dashboard .glass-metric-primary:hover,
#section-dashboard .glass-metric-purple:hover,
#section-dashboard .glass-metric-red:hover,
#section-dashboard .liquid-glass-amber:hover,
#btn-pomo-desempenho-dash:hover,
#section-dashboard .liquid-glass:hover {
  will-change: transform, backdrop-filter;
  transform: translateY(-4px) scale(1.025) !important;
  background: rgba(255, 255, 255, 0.30) !important;
  border-color: rgba(255, 255, 255, 0.65) !important;
  backdrop-filter: blur(22px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(180%) !important;
  box-shadow:
    0 8px 32px rgba(100, 60, 220, 0.28),
    0 2px 12px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* Hover específico para cards Tipo B (cards largos) de ação */
#btn-dash-daily-goals:hover,
#btn-pomo-desempenho-dash:hover {
  transform: translateY(-3px) scale(1.012) !important;
}

/* Oculta reflexo estático quando em hover */
#section-dashboard .glass-metric-amber:hover::before,
#section-dashboard .glass-metric-primary:hover::before,
#section-dashboard .glass-metric-purple:hover::before,
#section-dashboard .glass-metric-red:hover::before,
#section-dashboard .liquid-glass-amber:hover::before,
#btn-pomo-desempenho-dash:hover::before,
#section-dashboard .liquid-glass:hover::before {
  opacity: 0;
}

/* Exibe o brilho dinâmico do mouse no hover */
#section-dashboard .glass-metric-amber:hover::after,
#section-dashboard .glass-metric-primary:hover::after,
#section-dashboard .glass-metric-purple:hover::after,
#section-dashboard .glass-metric-red:hover::after,
#section-dashboard .liquid-glass-amber:hover::after,
#btn-pomo-desempenho-dash:hover::after,
#section-dashboard .liquid-glass:hover::after {
  opacity: 1;
}

/* Estado Active (Clique) */
#section-dashboard .glass-metric-amber:active,
#section-dashboard .glass-metric-primary:active,
#section-dashboard .glass-metric-purple:active,
#section-dashboard .glass-metric-red:active,
#section-dashboard .liquid-glass-amber:active,
#btn-pomo-desempenho-dash:active,
#section-dashboard .liquid-glass:active {
  transform: translateY(-1px) scale(1.008) !important;
  box-shadow:
    0 3px 12px rgba(100, 60, 220, 0.18),
    0 1px 4px rgba(0, 0, 0, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.40) !important;
  transition-duration: 80ms !important;
}

/* ==========================================================================
   MÓDULO DE MAPAS MENTAIS - REDESIGN ESTILO STITCH (TELA CHEIA IMERSIVA)
   ========================================================================== */

#panel-mapas_mentais:not(.hidden) {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #0f172a;
  margin: 0 !important;
  padding: 0 !important;
}

/* 1. HEADER GLOBAL DO MAPA MENTAL — removido (navegação via botão flutuante) */
#mindmap-header {
  display: none !important;
}

#mindmap-header .logo-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #818cf8;
  cursor: pointer;
  transition: opacity 150ms ease;
}

#mindmap-header .logo-btn:hover {
  opacity: 0.85;
}

/* 2. CORPO DO LAYOUT */
#mindmap-body {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
  background: #0f172a;
}

/* 3. ZONA 2 - PAINEL DO AGENTE IA (ESQUERDA) */
#agent-panel {
  width: 280px;
  min-width: 280px;
  height: 100%;
  background: #1f2937;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  transition: width 280ms cubic-bezier(0.4, 0, 0.2, 1), opacity 280ms ease;
  overflow: hidden;
  z-index: 5;
  flex-shrink: 0;
}

#agent-panel.collapsed {
  width: 0;
  min-width: 0;
  opacity: 0;
  border-right-width: 0px;
  pointer-events: none;
}

/* Seções Internas do Painel Esquerdo */
.agent-panel-header {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.agent-status-indicator {
  width: 8px;
  height: 8px;
  background-color: #6366f1;
  border-radius: 50%;
  box-shadow: 0 0 8px #6366f1;
  animation: pulse-indicator 1.5s infinite alternate;
}

@keyframes pulse-indicator {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.25); opacity: 1; }
}

.agent-chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#agent-chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message-lila {
  background: #312e81;
  color: #c7d2fe;
  border-radius: 14px 14px 14px 4px;
  padding: 10px 12px;
  font-size: 13px;
  max-width: 85%;
  align-self: flex-start;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  line-height: 1.4;
}

.chat-message-user {
  background: #374151;
  color: #f3f4f6;
  border-radius: 14px 14px 4px 14px;
  padding: 10px 12px;
  font-size: 13px;
  max-width: 85%;
  align-self: flex-end;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  line-height: 1.4;
}

/* Chips de Ação Rápida */
.quick-chips-wrapper {
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex-shrink: 0;
}

.quick-chips-wrapper::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;
}

.quick-chip:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #c7d2fe;
}

/* Input do Agente */
.agent-input-container {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.agent-input-wrapper {
  display: flex;
  align-items: center;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 4px 8px 4px 12px;
}

.agent-input-wrapper:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.agent-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 12px;
  color: #f3f4f6;
  padding: 6px 0;
}

.agent-input-field::placeholder {
  color: #6b7280;
}

/* Console Logs do Agente */
.agent-logs-container {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: #111827;
  flex-shrink: 0;
}

.agent-logs-header {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 800;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.agent-logs-content {
  max-height: 90px;
  overflow-y: auto;
  padding: 8px 12px;
  background: #090d16;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: #64748b;
  line-height: 1.5;
}

/* 4. ZONA 3 - CANVAS CENTRAL */
#canvas-zone {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

#mindmap-container-area {
  width: 100%;
  height: 100%;
  background-color: #0f172a;
  background-image: radial-gradient(rgba(99, 102, 241, 0.12) 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  position: relative;
  overflow: hidden;
}

/* Nós do Mapa */
.node-root {
  background: #312e81;
  border: 1.5px solid #6366f1;
  border-radius: 24px !important;
  padding: 10px 24px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #c7d2fe;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  cursor: grab !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 4px 20px rgba(99, 102, 241, 0.25) !important;
  transition: box-shadow 200ms ease, transform 200ms ease !important;
}

.node-root:hover {
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.22), 0 8px 28px rgba(99, 102, 241, 0.35) !important;
  transform: scale(1.03) !important;
}

.node-branch {
  background: #1e293b;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 14px !important;
  padding: 7px 16px !important;
  font-size: 12px !important;
  color: #94a3b8;
  cursor: grab !important;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease, color 200ms ease !important;
}

.node-branch:hover {
  border-color: rgba(99, 102, 241, 0.75);
  background: #263045;
  color: #c7d2fe;
  transform: translateY(-2px) !important;
}

.node-branch.selected {
  border-color: #6366f1;
  background: #1e1b4b;
  color: #e0e7ff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

.node-leaf {
  background: #1e293b;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px !important;
  padding: 6px 12px !important;
  font-size: 11px !important;
  color: #64748b;
  cursor: grab !important;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease, color 200ms ease !important;
}

.node-leaf:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: #263045;
  color: #94a3b8;
  transform: translateY(-1px) !important;
}

.node-leaf.selected {
  border-color: #6366f1;
  background: #1e1b4b;
  color: #e0e7ff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

/* Conexões Bezier */
#mindmap-svg path {
  transition: stroke 200ms ease, stroke-width 200ms ease, opacity 200ms ease;
}

@keyframes drawPath {
  to { stroke-dashoffset: 0; }
}

.path-animated {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawPath 600ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Minimapa Reativo */
#mindmap-minimap {
  position: absolute;
  bottom: 76px; /* Posicionado acima dos controles de zoom */
  right: auto !important;
  left: 24px;
  width: 120px;
  height: 80px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  z-index: 20;
  backdrop-filter: blur(8px);
  transition: left 280ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
}

#mindmap-minimap .close-minimap-btn {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #9ca3af;
  font-size: 8px;
  font-weight: bold;
}

#mindmap-minimap .close-minimap-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* 5. ZONA 4 - TOOLBAR DIREITA (ALINHADA À DIREITA E VERTICAL) */
#right-toolbar {
  position: static;
  width: auto;
  min-width: auto;
  background: transparent;
  border-left: none;
  display: flex;
  z-index: 5;
  transition: none;
}

#right-toolbar.expanded {
  width: auto;
}

.right-toolbar-icons {
  position: fixed;
  top: 120px; /* Um pouco mais baixo para alinhar bem com o canvas e botões flutuantes */
  left: auto;
  right: 24px;
  width: 54px;
  height: auto;
  display: flex;
  flex-direction: column; /* VERTICAL! */
  align-items: center;
  justify-content: center;
  padding: 16px 0;
  gap: 12px;
  border-right: none;
  background: rgba(30, 41, 59, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 27px; /* Cantos arredondados do retângulo de pé */
  box-shadow: 
    0 10px 30px -10px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  z-index: 130;
  transition: right 300ms cubic-bezier(0.4, 0, 0.2, 1), background 300ms ease;
  flex-shrink: 0;
}

/* Não precisa deslocar a barra de ferramentas quando o painel IA (esquerdo) expande, pois está na direita */
#agent-panel:not(.collapsed) ~ #right-toolbar .right-toolbar-icons {
  right: 24px;
  left: auto;
}

/* Quando expandido com painel de edições aberto */
#right-toolbar.expanded .right-toolbar-icons {
  right: 348px; /* 24px margem + 300px painel + 24px gap */
  left: auto;
}

/* Quando expandido com painel de edições aberto E o painel IA (esquerdo) estiver expandido */
#agent-panel:not(.collapsed) ~ #right-toolbar.expanded .right-toolbar-icons {
  right: 348px; /* 24px margem + 300px painel + 24px gap */
  left: auto;
}

.right-toolbar-icons .flex-1 {
  display: none;
}

.right-toolbar-panel {
  position: fixed;
  top: 120px; /* Alinhado ao topo da barra de ícones */
  left: auto;
  right: 24px;
  bottom: 96px;
  width: 300px;
  min-width: 300px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 
    0 20px 40px -15px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  z-index: 125;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px); /* Transição sutil vindo da direita */
}

/* Não precisa deslocar o painel de edições quando o painel IA (esquerdo) expande, pois está na direita */
#agent-panel:not(.collapsed) ~ #right-toolbar .right-toolbar-panel {
  right: 24px;
  left: auto;
}

/* Quando expandido */
#right-toolbar.expanded .right-toolbar-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: scale(1.08) translateX(-2px); /* Se projeta ligeiramente para o lado ao passar o mouse */
}

.tool-btn.active {
  background: rgba(99, 102, 241, 0.25);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
  transform: scale(1.05);
}

.tool-btn#tool-delete-node:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.tool-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Melhoria de Nitidez para Ícones da Barra de Ferramentas do Mapa Mental (Lila AI e Lixeira) */
.tool-btn#tool-lila-chat {
  color: #c084fc !important; /* Roxo brilhante para a Lila AI */
  opacity: 0.9 !important;
}
.tool-btn#tool-lila-chat img {
  opacity: 1 !important;
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.5));
}
.tool-btn#tool-lila-chat:hover {
  opacity: 1 !important;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.8));
}

.tool-btn#tool-delete-node {
  color: #f87171 !important; /* Vermelho claro nítido para a lixeira */
  opacity: 0.8 !important;
}
.tool-btn#tool-delete-node:hover {
  color: #ef4444 !important;
  opacity: 1 !important;
}
.tool-btn#tool-delete-node.disabled {
  opacity: 0.3 !important;
  color: rgba(255, 255, 255, 0.35) !important;
}

/* 6. MODO FULLSCREEN TOTAL */
.canvas-zone-fullscreen-total #mindmap-container-area {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 200;
}

.btn-exit-fullscreen-total {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 210;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: all 150ms ease;
}

.btn-exit-fullscreen-total:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: #6366f1;
  transform: scale(1.05);
}

/* Seletor de Modo do Mapa Mental (Liquid Glass) */
#mindmap-mode-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent !important;
  border: none !important;
  border-radius: 0px !important;
  padding: 0 !important;
  box-shadow: none !important;
}

#mindmap-mode-selector button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

#mindmap-mode-selector button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

#mindmap-mode-selector button.active {
  background: rgba(99, 102, 241, 0.25) !important;
  color: #818cf8 !important;
  border: 1px solid rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

/* --- Sistema de Modos de Interação do Mapa Mental --- */
#mindmap-mode-selector button {
  transition: all 0.2s ease;
  opacity: 0.6;
}

#mindmap-mode-selector button.modo-ativo,
#mindmap-mode-selector button.active {
  opacity: 1;
  background: rgba(99, 102, 241, 0.25) !important;
  color: #818cf8 !important;
  border: 1px solid rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3) !important;
}

/* Cursor do canvas por modo */
.canvas-modo-selecao,
.canvas-modo-selecao .node-branch,
.canvas-modo-selecao .node-leaf,
.canvas-modo-selecao .node-root {
  cursor: default !important;
}

.canvas-modo-arrastar,
.canvas-modo-arrastar .node-branch,
.canvas-modo-arrastar .node-leaf,
.canvas-modo-arrastar .node-root {
  cursor: grab !important;
}

.canvas-modo-arrastar-dragging,
.canvas-modo-arrastar-dragging .node-branch,
.canvas-modo-arrastar-dragging .node-leaf,
.canvas-modo-arrastar-dragging .node-root {
  cursor: grabbing !important;
}

/* Correção de pointer-events da barra lateral direita e botões */
#right-toolbar,
.right-toolbar-icons,
.right-toolbar-panel {
  pointer-events: all !important;
  z-index: 1000 !important;
}

.tool-btn {
  pointer-events: all !important;
}

/* Efeito de deslizamento do botão do mapa mental quando a sidebar abrir */
#agent-panel:not(.collapsed) ~ #mindmap-left-actions-container {
  left: 296px !important; /* 280px do painel + 16px de espaçamento */
}
#mindmap-left-actions-container {
  transition: left 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Transições fluidas de posição de nós */
.node-btn {
  transition: left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Desabilita transições ao arrastar para evitar lag */
.node-btn.dragging {
  transition: none !important;
}

/* Animações de Entrada (pop-in) e Saída (pop-out) */
@keyframes node-pop-in {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes node-pop-out {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.6);
  }
}

.node-btn-entering {
  animation: node-pop-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

.node-deleting {
  animation: node-pop-out 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
  pointer-events: none !important;
}

/* --- SEÇÃO INTERATIVA: COMO VOCÊ GANHA COM A GENTE --- */
.como-ganha-slide {
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

@keyframes slow-pan {
  0% { transform: scale(1.02) translate(0px, 0px); }
  50% { transform: scale(1.08) translate(-10px, 8px); }
  100% { transform: scale(1.02) translate(0px, 0px); }
}

.animate-slow-pan {
  animation: slow-pan 25s ease-in-out infinite;
}

/* Feynman Chat Mockup (Homepage) */
.feynman-msg {
  opacity: 0;
  transform: translateY(8px);
  animation: feynman-msg-appear 6s infinite;
}

@keyframes feynman-msg-appear {
  0%, 10% { opacity: 0; transform: translateY(8px); }
  15%, 45% { opacity: 1; transform: translateY(0); }
  50%, 100% { opacity: 0; transform: translateY(-8px); }
}

.feynman-msg-child {
  opacity: 0;
  transform: translateY(8px);
  animation: feynman-msg-child-appear 6s infinite;
}

@keyframes feynman-msg-child-appear {
  0%, 30% { opacity: 0; transform: translateY(8px); }
  35%, 80% { opacity: 1; transform: translateY(0); }
  85%, 100% { opacity: 0; transform: translateY(-8px); }
}

/* ═══════════════════════════════════════════════════════════ */
/* FEYNMAN CHAT — Estilos Completos                          */
/* ═══════════════════════════════════════════════════════════ */

.feynman-chat-wrapper {
  display: flex;
  flex-direction: column;
  height: 70vh;
  min-height: 500px;
  max-height: 800px;
  border-radius: 2rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  position: relative;
}

.feynman-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  gap: 12px;
  flex-shrink: 0;
  z-index: 5;
}

.feynman-messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feynman-input-bar {
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  z-index: 5;
}

/* ── Drawer de Conversas ── */
.feynman-conversations-drawer {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  animation: fcDrawerSlideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fcDrawerSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fc-conversation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.fc-conversation-item:hover {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.12);
}

.fc-conversation-item.active {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
}

.fc-conversation-item .fc-conv-delete {
  opacity: 0;
  transition: opacity 0.2s;
}

.fc-conversation-item:hover .fc-conv-delete {
  opacity: 1;
}

/* ── Bolhas de Mensagem ── */
.fc-bubble {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 20px;
  animation: fcBubbleIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  word-wrap: break-word;
  line-height: 1.6;
}

@keyframes fcBubbleIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.fc-bubble-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  color: white;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.fc-bubble-lila {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.7);
  color: #2e3040;
  border-bottom-left-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

/* Badge de tipo na bolha */
.fc-bubble-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.fc-badge-aula {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

.fc-badge-pergunta {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.fc-badge-pergunta-user {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

/* ── Feedback Card Inline ── */
.fc-feedback-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 20px;
  max-width: 85%;
  align-self: flex-start;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  animation: fcBubbleIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.fc-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: white;
}

.fc-score-high { background: linear-gradient(135deg, #10b981, #059669); }
.fc-score-mid { background: linear-gradient(135deg, #f59e0b, #d97706); }
.fc-score-low { background: linear-gradient(135deg, #ef4444, #dc2626); }

.fc-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.fc-pros-cons > div {
  padding: 12px;
  border-radius: 14px;
  font-size: 11px;
}

.fc-pros {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.fc-cons {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

/* ── Indicador de Digitação ── */
.feynman-typing-indicator {
  flex-shrink: 0;
  background: transparent;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6366f1;
  animation: typingBounce 1.2s infinite ease-in-out;
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ── Mensagem de boas-vindas da Lila ── */
.fc-welcome-bubble {
  align-self: flex-start;
  max-width: 90%;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(124, 58, 237, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 20px;
  border-bottom-left-radius: 6px;
  animation: fcBubbleIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Timestamp nas mensagens ── */
.fc-timestamp {
  font-size: 9px;
  font-weight: 600;
  opacity: 0.5;
  margin-top: 4px;
  display: block;
}

/* ── Transcrição no feedback ── */
.fc-transcription-box {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  font-style: italic;
  color: #585a68;
  line-height: 1.5;
  margin-top: 10px;
}

/* Responsive */
@media (max-width: 640px) {
  .feynman-chat-wrapper {
    height: 75vh;
    border-radius: 1.5rem;
  }
  .fc-pros-cons {
    grid-template-columns: 1fr;
  }
  .fc-bubble {
    max-width: 92%;
  }
  .fc-feedback-card {
    max-width: 95%;
  }
}

/* Pomodoro Animations */
.pomodoro-ring-glow {
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  animation: pomo-timer-run 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes pomo-timer-run {
  0% { stroke-dashoffset: 283; stroke: #f43f5e; }
  45% { stroke-dashoffset: 0; stroke: #f43f5e; }
  50% { stroke-dashoffset: 283; stroke: #10b981; }
  95% { stroke-dashoffset: 0; stroke: #10b981; }
  100% { stroke-dashoffset: 283; stroke: #f43f5e; }
}

.pomo-pulse {
  animation: pomo-pulse-glow 2s infinite;
}

@keyframes pomo-pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(1.15); opacity: 0.35; }
}

/* Flashcards Flip 3D */
.flashcard-3d-wrapper {
  perspective: 1000px;
}

.flashcard-3d-card {
  transform-style: preserve-3d;
  animation: card-auto-flip 6s infinite ease-in-out;
}

@keyframes card-auto-flip {
  0%, 5% { transform: rotateY(0deg); }
  45%, 55% { transform: rotateY(180deg); }
  95%, 100% { transform: rotateY(360deg); }
}

.card-face-front, .card-face-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-face-back {
  transform: rotateY(180deg);
}

/* SRS Curve Animation */
.srs-curve-path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: srs-curve-flow 8s ease-in-out infinite;
}

@keyframes srs-curve-flow {
  0%, 5% { stroke-dashoffset: 400; }
  90%, 100% { stroke-dashoffset: 0; }
}

.srs-point {
  transform: scale(0);
  opacity: 0;
  animation: srs-point-pop 8s ease-in-out infinite;
}

@keyframes srs-point-pop {
  0%, 20% { transform: scale(0); opacity: 0; }
  25%, 90% { transform: scale(1); opacity: 1; }
  95%, 100% { transform: scale(0); opacity: 0; }
}

.srs-point-delayed {
  transform: scale(0);
  opacity: 0;
  animation: srs-point-pop-delayed 8s ease-in-out infinite;
}

@keyframes srs-point-pop-delayed {
  0%, 50% { transform: scale(0); opacity: 0; }
  55%, 90% { transform: scale(1); opacity: 1; }
  95%, 100% { transform: scale(0); opacity: 0; }
}

/* Mindmaps floating nodes */
.node-floating-1 {
  animation: float-node-1 5s ease-in-out infinite;
}

.node-floating-2 {
  animation: float-node-2 6s ease-in-out infinite 0.5s;
}

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

@keyframes float-node-2 {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(8px) scale(1.02); }
}

/* Calendar streak */
.calendar-day-active {
  animation: calendar-streaks 7s infinite;
}

@keyframes calendar-streaks {
  0%, 10% { background-color: rgba(255, 255, 255, 0.05); box-shadow: none; }
  30%, 90% { background-color: #f59e0b; box-shadow: 0 0 12px rgba(245, 158, 11, 0.6); }
  95%, 100% { background-color: rgba(255, 255, 255, 0.05); box-shadow: none; }
}

/* Goal checkboxes and level-up */
.goal-task-checkbox {
  animation: checkbox-check 6s infinite;
}

@keyframes checkbox-check {
  0%, 15% { content: "check_box_outline_blank"; color: rgba(255,255,255,0.4); }
  25%, 85% { content: "check_box"; color: #10b981; }
  95%, 100% { content: "check_box_outline_blank"; color: rgba(255,255,255,0.4); }
}

.goal-xp-fill {
  width: 0%;
  animation: xp-bar-growing 6s infinite;
}

@keyframes xp-bar-growing {
  0%, 25% { width: 10%; }
  60%, 85% { width: 100%; }
  90%, 100% { width: 0%; }
}

.level-up-tag {
  opacity: 0;
  transform: scale(0.8) translateY(10px);
  animation: level-up-tag-pop 6s infinite;
}

@keyframes level-up-tag-pop {
  0%, 60% { opacity: 0; transform: scale(0.8) translateY(10px); }
  65%, 85% { opacity: 1; transform: scale(1) translateY(0); }
  90%, 100% { opacity: 0; transform: scale(0.8) translateY(-10px); }
}

/* ═══════════════════════════════════════════════════════════ */
/* FEYNMAN CHAT DARK BLUE THEME OVERRIDES & ORBS             */
/* ═══════════════════════════════════════════════════════════ */

.feynman-chat-wrapper {
  background: linear-gradient(135deg, #070e1b 0%, #0c1e3d 50%, #040710 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
  color: #f1f5f9 !important;
  position: relative;
  overflow: hidden;
}

/* Elementos visuais em movimento (Orbes) */
.feynman-bg-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.18;
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
}

.feynman-orb-1 {
  width: 280px;
  height: 280px;
  top: -40px;
  left: -40px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  animation: feynman-orb-float-1 25s infinite alternate ease-in-out;
}

.feynman-orb-2 {
  width: 320px;
  height: 320px;
  bottom: -60px;
  right: -60px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  animation: feynman-orb-float-2 20s infinite alternate ease-in-out;
}

.feynman-orb-3 {
  width: 220px;
  height: 220px;
  top: 35%;
  left: 45%;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  animation: feynman-orb-float-3 18s infinite alternate ease-in-out;
}

@keyframes feynman-orb-float-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(70px, 50px) scale(1.15); }
}

@keyframes feynman-orb-float-2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-90px, -60px) scale(0.9); }
}

@keyframes feynman-orb-float-3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, -70px) scale(1.1); }
}

/* Cabeçalho */
.feynman-chat-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(10, 17, 30, 0.45) !important;
  z-index: 10;
  position: relative;
}

.feynman-chat-header h3 {
  color: #ffffff !important;
}

/* Área de Mensagens */
.feynman-messages-area {
  z-index: 5;
  position: relative;
  background: transparent !important;
}

/* Barra de Input */
.feynman-input-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(8, 14, 25, 0.7) !important;
  z-index: 10;
  position: relative;
  transform: translateY(50px);
  opacity: 0;
  animation: fcInputSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Estilos de inputs no tema escuro */
#fc-text-input {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

#fc-text-input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

/* Conversas Drawer */
.feynman-conversations-drawer {
  background: rgba(6, 11, 22, 0.96) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  z-index: 20;
}

.feynman-conversations-drawer span {
  color: #f1f5f9 !important;
}

.fc-conversation-item {
  border-color: rgba(255, 255, 255, 0.05);
}

.fc-conversation-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

.fc-conversation-item span {
  color: #cbd5e1 !important;
}

.fc-conversation-item.active {
  background: rgba(99, 102, 241, 0.25) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
}

.fc-conversation-item.active span {
  color: #ffffff !important;
}

/* Bolhas de chat e cards no tema escuro */
.fc-bubble-lila {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.fc-feedback-card {
  background: rgba(10, 16, 28, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
  color: #cbd5e1 !important;
}

.fc-feedback-card h4 {
  color: #ffffff !important;
}

.fc-welcome-bubble {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(124, 58, 237, 0.08)) !important;
  border: 1px solid rgba(99, 102, 241, 0.22) !important;
  color: #e2e8f0 !important;
}

.fc-welcome-bubble span {
  color: #ffffff !important;
}

.fc-pros-cons > div p, .fc-pros-cons > div li {
  color: #cbd5e1 !important;
}

.fc-transcription-box {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}

/* Delays de animação para os textos de inicialização */
.delay-100 { animation-delay: 100ms !important; }
.delay-200 { animation-delay: 200ms !important; }
.delay-300 { animation-delay: 300ms !important; }
.delay-400 { animation-delay: 400ms !important; }
.delay-500 { animation-delay: 500ms !important; }

/* ============================================================
   Aba Método Feynman — Customizações Visuais Específicas
   ============================================================ */

/* Impedir que os elementos pais com transform, filter, animation ou max-width
   restrinjam o layout fixed do Feynman.
   ATENÇÃO: qualquer transform (mesmo translateY(0)) num ancestral cria um
   containing block novo para position:fixed, o que faz o painel ser posicionado
   relativo ao ancestral em vez do viewport. Por isso zeramos animation, filter,
   transform, perspective, backdrop-filter, will-change e contain. */
body.feynman-active #section-lab,
body.feynman-active #tool-content {
  animation: none !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  perspective: none !important;
  will-change: auto !important;
  contain: none !important;
  max-width: 100vw !important;
  width: 100vw !important;
  padding: 0 !important;
  margin: 0 !important;
  position: static !important;
}

/* Também zeramos qualquer transform no <html> e <body> — evita reparent do fixed.
   Além disso, forçamos o fundo do body para navy escuro. O Lab de Estudos aplica
   background-color: #d1ebd9 "verde menta" via html.light body.body-lab-bg,
   e desenha dois orbs verdes via ::before / ::after — essa era a "faixa verde"
   que aparecia acima do painel Feynman. Usamos especificidade ≥ à regra do Lab
   (html + body + 2 classes) para vencer com !important. */
html.light body.feynman-active,
html.dark body.feynman-active,
html body.feynman-active.body-lab-bg,
html.light body.feynman-active.body-lab-bg,
html.dark body.feynman-active.body-lab-bg {
  transform: none !important;
  filter: none !important;
  perspective: none !important;
  background-color: #0d0d1a !important;
  background-image: none !important;
}
html body.feynman-active::before,
html body.feynman-active::after,
html.light body.feynman-active.body-lab-bg::before,
html.light body.feynman-active.body-lab-bg::after,
html.dark body.feynman-active.body-lab-bg::before,
html.dark body.feynman-active.body-lab-bg::after {
  display: none !important;
  content: none !important;
  background: none !important;
  animation: none !important;
  opacity: 0 !important;
}

/* 1. Painel azul escuro em tela cheia na vertical e horizontal ocupando toda a tela */
body.feynman-active #panel-feynman {
  margin: 0 !important;
  padding: 0 !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  min-width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  position: fixed !important;
  z-index: 10001 !important; /* Acima da barra flutuante superior (#bottom-nav) */
  background: linear-gradient(135deg, #0d0d1a 0%, #0f0a1e 50%, #0a0f1e 100%) !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  border: none !important;
  transform: none !important;
}


/* Ocultar elementos globais da SPA — tela cheia real, sem faixa superior */
body.feynman-active #btn-back-to-methods,
body.feynman-active #bottom-nav,
body.feynman-active #btn-trigger-sidebar,
body.feynman-active #lila-sidebar-drawer,
body.feynman-active #lila-bg-overlay {
  display: none !important;
}

/* Travar rolagem do body para não expor a página por baixo do painel */
body.feynman-active {
  overflow: hidden !important;
}

.feynman-fullscreen-layout {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  position: relative !important;
}

/* DIVISOR REDIMENSIONÁVEL ENTRE COLUNAS (FEYNMAN) */
.fc-col-resizer {
  flex: 0 0 auto;
  width: 0;
  align-self: stretch;
  cursor: col-resize;
  position: relative;
  z-index: 30;
  background: transparent;
  transition: background 0.2s ease;
  /* Oculto até a coluna adjacente estar aberta (ativado via JS) */
  display: none;
}
.fc-col-resizer.fc-resizer-active {
  display: block;
  width: 6px;
}
.fc-col-resizer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: rgba(124, 58, 237, 0.25);
  transition: background 0.2s ease, width 0.2s ease;
}
.fc-col-resizer:hover::before,
.fc-col-resizer.fc-resizing::before {
  width: 3px;
  background: rgba(167, 139, 250, 0.85);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.55);
}
body.fc-col-resizing,
body.fc-col-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}
/* Sem animação de largura enquanto arrasta (evita lag) */
body.fc-col-resizing .feynman-sidebar,
body.fc-col-resizing .feynman-analysis-sidebar {
  transition: none !important;
  animation: none !important;
}
@media (max-width: 1023px) {
  .fc-col-resizer { display: none !important; }
}

/* SIDEBAR ESQUERDA */
.feynman-sidebar {
  background: rgba(255, 255, 255, 0.03) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  animation: slideInLeft 0.35s ease-out both !important;
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Card Modo Ativo na Sidebar */
.fc-sidebar-mode-card {
  transition: all 0.2s ease !important;
}
.fc-sidebar-mode-card:hover {
  background: rgba(124, 58, 237, 0.2) !important;
}

/* Lista de sessões */
.fc-history-list {
  scrollbar-width: thin !important;
}
.fc-history-item {
  transition: all 0.2s ease !important;
  border: 1px solid transparent !important;
}
.fc-history-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}
.fc-history-item.active {
  background: rgba(124, 58, 237, 0.15) !important;
  border-color: rgba(124, 58, 237, 0.3) !important;
}

/* CHAT CENTRAL */
.feynman-chat-center {
  animation: fadeIn 0.3s ease-out both !important;
}

.feynman-chat-center header {
  animation: fadeInDown 0.3s ease-out both !important;
}

@keyframes fadeInDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* EMPTY STATE */
.fc-empty-title {
  animation: fadeInUp 0.4s ease-out 0.2s both !important;
}
.fc-empty-subtitle {
  animation: fadeInUp 0.4s ease-out 0.25s both !important;
}
.fc-empty-cards-wrapper {
  animation: fadeInUp 0.4s ease-out 0.3s both !important;
}

/* Cards de Modo */
.fc-mode-card-aula {
  background: rgba(124, 58, 237, 0.12) !important;
  border: 1px solid rgba(124, 58, 237, 0.3) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.fc-mode-card-aula:hover {
  transform: scale(1.03) !important;
  box-shadow: 0 0 25px rgba(124, 58, 237, 0.25) !important;
  background: rgba(124, 58, 237, 0.18) !important;
}

.fc-mode-card-duvidas {
  background: rgba(234, 179, 8, 0.10) !important;
  border: 1px solid rgba(234, 179, 8, 0.3) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.fc-mode-card-duvidas:hover {
  transform: scale(1.03) !important;
  box-shadow: 0 0 25px rgba(234, 179, 8, 0.2) !important;
  background: rgba(234, 179, 8, 0.15) !important;
}

/* BALÕES DE CONVERSA */
.fc-messages-area {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.fc-bubble {
  max-width: 75% !important;
  animation: fadeInUp 0.25s ease-out both !important;
}

.fc-bubble-user {
  align-self: flex-end !important;
  background: #7C3AED !important;
  color: #ffffff !important;
  border-radius: 18px 18px 4px 18px !important;
  padding: 12px 18px !important;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2) !important;
}

.fc-bubble-lila {
  align-self: flex-start !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #E2E8F0 !important;
  border-radius: 18px 18px 18px 4px !important;
  padding: 12px 18px !important;
}

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

/* PAINEL DIREITO */
.feynman-analysis-sidebar {
  background: rgba(255, 255, 255, 0.02) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  animation: slideInRight 0.35s ease-out both !important;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* RESPONSIVIDADE E SLIDE-OVERS */
@media (max-width: 1023px) {
  .feynman-analysis-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 300px !important;
    z-index: 250 !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: rgba(13, 13, 26, 0.98) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.5) !important;
    animation: none !important;
  }
  .feynman-analysis-sidebar.analysis-open {
    transform: translateX(0) !important;
  }
}

@media (max-width: 767px) {
  .feynman-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    z-index: 250 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: rgba(13, 13, 26, 0.98) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.5) !important;
    animation: none !important;
  }
  .feynman-sidebar.sidebar-open {
    transform: translateX(0) !important;
  }
}

/* ==================== ANIMAÇÕES E INTERAÇÕES FASE 3 (FLASHCARDS) ==================== */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes purple-outline-pulse {
  0% {
    outline-color: rgba(124, 58, 237, 0.2);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
  }
  50% {
    outline-color: rgba(124, 58, 237, 0.65);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.35);
  }
  100% {
    outline-color: rgba(124, 58, 237, 0.2);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
  }
}

@keyframes fadeInDownScale {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fc-animate-fade-in-left {
  animation: fadeInLeft 0.4s ease-out both;
  will-change: transform, opacity;
}

.fc-animate-fade-in-right {
  animation: fadeInRight 0.4s ease-out both;
  will-change: transform, opacity;
}

.fc-animate-fade-in-up-1 {
  animation: fadeInUpCustom 0.5s ease-out both;
  animation-delay: 0.1s;
  will-change: transform, opacity;
}

.fc-animate-fade-in-up-2 {
  animation: fadeInUpCustom 0.5s ease-out both;
  animation-delay: 0.2s;
  will-change: transform, opacity;
}

.fc-animate-card-list-item {
  animation: fadeInUpCustom 0.35s ease-out both;
  will-change: transform, opacity;
}

.fc-animate-button-type {
  animation: fadeInScale 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  will-change: transform, opacity;
}

.animate-letter {
  display: inline-block;
  animation: fadeInDownScale 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1) both;
  will-change: transform, opacity;
}

/* Efeitos de inputs na aba de criação */
.fc-input-styled {
  transition: box-shadow 0.2s ease, border-color 0.2s ease, outline-color 0.2s ease !important;
}
.fc-input-styled:hover {
  border-color: rgba(124, 58, 237, 0.4) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}
.fc-input-styled:focus {
  outline: 2px solid #7C3AED !important;
  animation: purple-outline-pulse 2s infinite ease-in-out !important;
}

/* Hover nos cards criados */
.editor-card-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.editor-card-item:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

/* Hover botão Adicionar ao Baralho */
#btn-add-manual-card:hover {
  transform: scale(1.03) !important;
  filter: brightness(1.1) drop-shadow(0 0 8px rgba(37, 99, 235, 0.35)) !important;
  transition: transform 0.2s ease, filter 0.2s ease !important;
}

/* Waveform animado de áudio */
@keyframes wavePulse {
  0%, 100% { height: 6px; }
  50% { height: 20px; }
}

.wave-bar {
  animation: wavePulse 1s ease-in-out infinite;
  will-change: height;
}

.wave-bar-1 { animation-delay: 0.1s; }
.wave-bar-2 { animation-delay: 0.3s; }
.wave-bar-3 { animation-delay: 0.5s; }
.wave-bar-4 { animation-delay: 0.2s; }
.wave-bar-5 { animation-delay: 0.4s; }

/* Hover nos cards gerados por IA */
.card-gerado {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
  cursor: pointer !important;
}

.card-gerado:hover {
  transform: scale(1.025) translateY(-3px) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
  background-color: rgba(255, 255, 255, 0.97) !important; /* levíssimo, não branco puro */
  filter: none !important;
}

/* Animações e Cursor Typewriter Lote 4 */
@keyframes typewriterBlink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.typewriter-cursor {
  display: inline-block;
  margin-left: 2px;
  animation: typewriterBlink 0.5s infinite;
  color: #7C3AED;
  font-weight: normal;
}

/* Destaque do Deck Recém-salvo Lote 4 */
@keyframes purpleBorderPulse {
  0%, 100% {
    border-color: rgba(124, 58, 237, 0.4) !important;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.4) !important;
  }
  50% {
    border-color: #7C3AED !important;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.8) !important;
  }
}

.deck-card.newly-created-highlight {
  animation: fadeInUpCustom 0.4s ease-out both, purpleBorderPulse 2s ease-in-out infinite !important;
  border: 2px solid #7C3AED !important;
}

/* Retângulo de Guias (Navegação) Adaptado ao Feynman - Agora Dinâmico e Expansível */
.feynman-nav-btn .feynman-nav-text {
  transition: max-width 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.25s ease-out, margin 0.3s ease !important;
}

.feynman-nav-guides:hover .feynman-nav-text {
  max-width: 120px !important;
  opacity: 1 !important;
  margin-left: 0.5rem !important;
}

.feynman-nav-guides {
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.feynman-nav-indicator {
  transition: left 0.3s cubic-bezier(0.25, 1, 0.5, 1), width 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* Remove backgrounds fixos individuais no hover para usar apenas o indicador flutuante */
.feynman-nav-guides:hover .feynman-nav-btn {
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.feynman-nav-guides:hover .feynman-nav-btn:hover {
  color: #c084fc !important;
}

/* Inputs do Modal Feynman com texto branco e legível */
#fc-new-topic, #fc-new-subject {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.4) !important;
}

#fc-new-topic::placeholder {
  color: rgba(255, 255, 255, 0.55) !important;
}

#fc-new-subject option {
  background-color: #0f0a1e !important;
  color: #ffffff !important;
}

/* Modo escuro para os inputs do Modal Feynman */
html.dark #fc-new-topic, 
html.dark #fc-new-subject {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.6) !important;
}

html.dark #fc-new-topic::placeholder {
  color: rgba(255, 255, 255, 0.65) !important;
}

html.dark #fc-new-subject option {
  background-color: #0f0a1e !important;
  color: #ffffff !important;
}

/* Animações de Inicialização e Saída do Método Feynman */
@keyframes feynmanScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes feynmanScaleOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
}

.feynman-animate-in {
  animation: feynmanScaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

.feynman-animate-out {
  animation: feynmanScaleOut 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
}

/* ==========================================================================
   TEMATIZAÇÃO DINÂMICA DO BOTTOM NAV GLOBAL
   ========================================================================== */

/* 1. TEMA TÉCNICA FEYNMAN — obsidiana + roxo (#0d0d1a / #7C3AED / #a78bfa) */
body.feynman-active #bottom-nav {
  z-index: 10000 !important;
}
body.feynman-active #bottom-nav .glass-pill {
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.14) 0%, rgba(13, 13, 26, 0) 55%),
    rgba(13, 13, 26, 0.88) !important;
  border: 1px solid rgba(167, 139, 250, 0.35) !important;
  border-radius: 22px !important;
  backdrop-filter: blur(28px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
  box-shadow:
    0 24px 48px -14px rgba(124, 58, 237, 0.45),
    0 0 0 1px rgba(124, 58, 237, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}
body.feynman-active #bottom-nav .nav-item {
  color: rgba(226, 214, 255, 0.55) !important;
}
body.feynman-active #bottom-nav .nav-item:hover,
body.feynman-active #bottom-nav .nav-item.active {
  color: #c4b5fd !important;
  text-shadow: 0 0 12px rgba(167, 139, 250, 0.55);
}
body.feynman-active #bottom-nav .nav-indicator-active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.55) 0%, rgba(167, 139, 250, 0.4) 100%) !important;
  border: 1px solid rgba(196, 181, 253, 0.5) !important;
  box-shadow:
    0 0 18px rgba(124, 58, 237, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* 2. TEMA MAPAS MENTAIS — slate + índigo (#0f172a / #1f2937 / #818cf8) */
body.mindmap-active #bottom-nav {
  z-index: 10000 !important;
}
body.mindmap-active #bottom-nav .glass-pill {
  background:
    linear-gradient(180deg, rgba(129, 140, 248, 0.14) 0%, rgba(15, 23, 42, 0) 55%),
    rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(129, 140, 248, 0.35) !important;
  border-radius: 22px !important;
  backdrop-filter: blur(28px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
  box-shadow:
    0 24px 48px -14px rgba(79, 70, 229, 0.45),
    0 0 0 1px rgba(99, 102, 241, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}
body.mindmap-active #bottom-nav .nav-item {
  color: rgba(199, 210, 254, 0.55) !important;
}
body.mindmap-active #bottom-nav .nav-item:hover,
body.mindmap-active #bottom-nav .nav-item.active {
  color: #a5b4fc !important;
  text-shadow: 0 0 12px rgba(129, 140, 248, 0.55);
}
body.mindmap-active #bottom-nav .nav-indicator-active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.55) 0%, rgba(129, 140, 248, 0.4) 100%) !important;
  border: 1px solid rgba(165, 180, 252, 0.5) !important;
  box-shadow:
    0 0 18px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
