/* Tree Page Specific Styling */
:root {
  /* Node Type Colors - Updated to use accent system where appropriate */
  --node-motivator: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-light));
  --node-task: linear-gradient(135deg, #4285F4, #34A5FF);
  --node-challenge: linear-gradient(135deg, #FF9900, #FFB84D);
  --node-class: linear-gradient(135deg, #8E44AD, #A569BD);
  --node-assignment: linear-gradient(135deg, #27AE60, #2ECC71);
  --node-test: linear-gradient(135deg, #E74C3C, #F5B7B1);
  --node-project: linear-gradient(135deg, #16A085, #1ABC9C);
  --node-essay: linear-gradient(135deg, #F1C40F, #F9E79F);
  --node-image: linear-gradient(135deg, #3498DB, #AED6F1);
  --node-idea: linear-gradient(135deg, #00bcd4, #80deea);
  --node-keyidea: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-light)); /* Use accent for key ideas */
  --node-question: linear-gradient(135deg, #ff5722, #ffab91);
  --node-problemtype: linear-gradient(135deg, #009688, #80cbc4);
  --node-nhscredit: linear-gradient(135deg, #FFD700, #FFF176);
  --node-learningObjective: linear-gradient(135deg, var(--accent-primary-dark), var(--accent-primary)); /* Use accent for learning objectives */
  
  /* Node Shadows */
  --node-shadow-light: 0 10px 20px rgba(0, 0, 0, 0.1);
  --node-shadow-dark: 0 10px 20px rgba(0, 0, 0, 0.4);
  
  /* Animation Speeds */
  --anim-speed-fast: 0.2s;
  --anim-speed-medium: 0.5s;
  --anim-speed-slow: 1s;
  
  /* Tree-specific variables that now use the accent system */
  --tree-primary: var(--accent-primary);
  --tree-primary-light: var(--accent-primary-light);
  --tree-primary-dark: var(--accent-primary-dark);
  --tree-shadow: var(--accent-primary-semi-transparent);
  
  /* Tutorial Colors */
  --tutorial-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --tutorial-success: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  --tutorial-warning: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
  --tutorial-celebration: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

/* Intro Overlay Styling */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background: linear-gradient(135deg, rgba(20, 30, 48, 0.98), rgba(36, 59, 85, 0.98));
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
  padding: 20px;
  animation: overlay-fade-in 0.8s ease-out forwards;
  transition: opacity 0.8s, transform 0.8s;
}

/* Closing animation for the intro overlay */
.intro-overlay.closing {
  opacity: 0;
  transform: scale(1.1);
  pointer-events: none;
}

.intro-overlay.closing .intro-content {
  transform: translateY(-30px);
  opacity: 0;
}

.intro-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.node-particle {
  position: absolute;
  width: 180px;
  height: 60px;
  border-radius: 12px;
  opacity: 0.1;
  filter: blur(2px);
  animation: float-around 20s infinite linear;
}

.node-particle:nth-child(1) {
  top: 10%;
  left: 5%;
  background: var(--node-motivator);
  animation-delay: 0s;
  transform: rotate(15deg) scale(0.8);
}

.node-particle:nth-child(2) {
  top: 70%;
  left: 15%;
  background: var(--node-task);
  animation-delay: -5s;
  transform: rotate(-10deg) scale(1.2);
}

.node-particle:nth-child(3) {
  top: 40%;
  left: 85%;
  background: var(--node-challenge);
  animation-delay: -10s;
  transform: rotate(5deg) scale(0.9);
}

.node-particle:nth-child(4) {
  top: 75%;
  left: 75%;
  background: var(--node-class);
  animation-delay: -2s;
  transform: rotate(-5deg) scale(1.1);
}

.node-particle:nth-child(5) {
  top: 25%;
  left: 60%;
  background: var(--node-assignment);
  animation-delay: -7s;
  transform: rotate(8deg) scale(0.7);
}

.node-particle:nth-child(6) {
  top: 85%;
  left: 40%;
  background: var(--node-test);
  animation-delay: -12s;
  transform: rotate(-12deg) scale(1);
}

.node-particle:nth-child(7) {
  top: 15%;
  left: 30%;
  background: var(--node-project);
  animation-delay: -4s;
  transform: rotate(20deg) scale(0.85);
}

.node-particle:nth-child(8) {
  top: 50%;
  left: 10%;
  background: var(--node-essay);
  animation-delay: -8s;
  transform: rotate(-8deg) scale(1.05);
}

@keyframes float-around {
  0% {
    transform: translateX(0) translateY(0) rotate(0deg);
  }
  25% {
    transform: translateX(100px) translateY(-50px) rotate(5deg);
  }
  50% {
    transform: translateX(200px) translateY(0) rotate(10deg);
  }
  75% {
    transform: translateX(100px) translateY(50px) rotate(5deg);
  }
  100% {
    transform: translateX(0) translateY(0) rotate(0deg);
  }
}

.intro-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), 
              0 0 0 1px rgba(255, 255, 255, 0.1);
  color: white;
  text-align: center;
  animation: content-rise-up 1s ease-out forwards;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.intro-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.08) 50%, 
    rgba(255, 255, 255, 0) 100%);
  animation: shimmer 5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.intro-title {
  font-size: 3.5rem;
  margin-bottom: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  opacity: 0;
  animation: title-fade-in 1s ease-out 0.3s forwards;
  background: linear-gradient(90deg, var(--accent-primary), #3498db);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.intro-title .highlight {
  font-size: 3.8rem;
  background: linear-gradient(90deg, var(--accent-primary), #3498db);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
}

.intro-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), #3498db);
  border-radius: 2px;
  opacity: 0.7;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.intro-section {
  background: rgba(255, 255, 255, 0.08);
  padding: 25px;
  border-radius: 15px;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: section-fade-in 0.8s ease-out forwards;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.intro-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.12);
}

.intro-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-primary), #3498db);
  border-radius: 2px 0 0 2px;
}

.intro-section:nth-child(1) { animation-delay: 0.4s; }
.intro-section:nth-child(2) { animation-delay: 0.5s; }
.intro-section:nth-child(3) { animation-delay: 0.6s; }
.intro-section:nth-child(4) { animation-delay: 0.7s; }
.intro-section:nth-child(5) { animation-delay: 0.8s; }
.intro-section:nth-child(6) { animation-delay: 0.9s; }

.intro-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent-primary), #52b3d9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  box-shadow: 0 10px 20px var(--accent-primary-semi-transparent);
  position: relative;
}

.intro-icon::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.2);
    opacity: 0;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.intro-section h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.intro-section p {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

.intro-quote {
  margin: 50px auto;
  max-width: 800px;
  position: relative;
  opacity: 0;
  animation: quote-fade-in 1s ease-out 1.2s forwards;
}

.intro-quote blockquote {
  font-size: 1.5rem;
  line-height: 1.6;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.intro-quote::before {
  content: '"';
  position: absolute;
  top: -60px;
  left: -20px;
  font-size: 12rem;
  color: rgba(255, 255, 255, 0.1);
  font-family: serif;
  z-index: 0;
}

.intro-button {
  margin-top: 20px;
  padding: 16px 32px;
  background: linear-gradient(45deg, var(--accent-primary), #3498db);
  border: none;
  border-radius: 50px;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 25px var(--accent-primary-semi-transparent);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: button-fade-in 1s ease-out 1.4s forwards;
}

.intro-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px var(--accent-primary-semi-transparent);
}

.intro-button:active {
  transform: translateY(1px);
  box-shadow: 0 5px 15px var(--accent-primary-semi-transparent);
}

.intro-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.3) 50%, 
    rgba(255, 255, 255, 0.1) 100%);
  transform: translateX(-100%);
  animation: button-shimmer 3s infinite;
}

@keyframes button-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.intro-tips {
  margin-top: 30px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0;
  animation: tips-fade-in 1s ease-out 1.6s forwards;
}

@keyframes overlay-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes content-rise-up {
  from { 
    opacity: 0;
    transform: translateY(30px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes quote-fade-in {
  from { 
    opacity: 0;
    transform: scale(0.95);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes button-fade-in {
  from { 
    opacity: 0;
    transform: scale(0.9);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes tips-fade-in {
  from { 
    opacity: 0;
  }
  to { 
    opacity: 1;
  }
}

/* Media queries for intro overlay on small screens */
@media (max-width: 768px) {
  .intro-title {
    font-size: 2.5rem;
  }
  
  .intro-title .highlight {
    font-size: 2.8rem;
  }
  
  .intro-grid {
    grid-template-columns: 1fr;
  }
  
  .intro-quote blockquote {
    font-size: 1.2rem;
  }
  
  .intro-button {
    font-size: 1rem;
    padding: 14px 28px;
  }
}

.tree-container {
  width: 100%;
  height: calc(100vh - 70px);
  position: relative;
  overflow: hidden;
  background: var(--bg-light);
  transition: background-color var(--transition-speed);
  cursor: grab;
}

.dark-mode .tree-container {
  background: var(--bg-dark);
}

.tree-container.panning {
  cursor: grabbing;
}

/* Canvas for drawing edges between nodes */
.tree-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Container for nodes */
.nodes-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* Node Styling */
.node {
  position: absolute;
  width: 180px;
  min-height: 60px;
  border-radius: 12px;
  padding: 15px;
  cursor: pointer;
  box-shadow: var(--node-shadow-light);
  transform-origin: center;
  z-index: 5;
  transition: transform 0.2s, box-shadow 0.2s, background-color var(--transition-speed);
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 500;
  overflow: hidden;
}

/* Pause animations when dragging */
.node.dragging {
  animation-play-state: paused !important;
  transition: none !important;
  transform: scale(1) !important;
}

.dark-mode .node {
  box-shadow: var(--node-shadow-dark);
}

.node:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15), 0 0 0 3px var(--accent-primary-ultra-light);
  z-index: 10;
}

.dark-mode .node:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 0 3px var(--accent-primary-semi-transparent);
}

.node:active {
  cursor: grabbing;
  transform: scale(1.02);
}

.node.selected {
  box-shadow: 0 0 0 4px var(--accent-primary), 0 15px 30px var(--accent-primary-semi-transparent);
  transform: scale(1.03);
}

.node.connecting {
  box-shadow: 0 0 0 3px var(--accent-primary-light), 0 0 20px var(--accent-primary-semi-transparent);
  animation: pulse-connect 1s infinite;
}

@keyframes pulse-connect {
  0% {
    box-shadow: 0 0 0 3px var(--accent-primary-light), 0 0 20px var(--accent-primary-semi-transparent);
  }
  50% {
    box-shadow: 0 0 0 6px var(--accent-primary), 0 0 30px var(--accent-primary-semi-transparent);
  }
  100% {
    box-shadow: 0 0 0 3px var(--accent-primary-light), 0 0 20px var(--accent-primary-semi-transparent);
  }
}

.node-title {
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
  pointer-events: none;
  padding-left: 24px;
  padding-right: 5px;
}

/* Due Date Display */
.node-due-date {
  font-size: 0.8rem;
  opacity: 0.9;
  padding: 3px 8px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  margin-top: 5px;
  pointer-events: none;
}

/* Node Types */
.node-motivator {
  background: var(--node-motivator);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.node-motivator::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 20px 20px 0;
  border-color: transparent rgba(255, 255, 255, 0.3) transparent transparent;
  transition: all 0.3s ease;
}

.node-motivator:hover::after {
  border-width: 0 30px 30px 0;
  border-color: transparent rgba(255, 255, 255, 0.5) transparent transparent;
}

.node-motivator:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 30px rgba(255, 26, 117, 0.3);
  z-index: 10;
}

.dark-mode .node-motivator:hover {
  box-shadow: 0 15px 30px rgba(255, 26, 117, 0.4);
}

.node-task {
  background: var(--node-task);
}

.node-challenge {
  background: var(--node-challenge);
  animation: none !important;
}

.node-challenge .node-icon {
  animation: wobble 5s infinite alternate !important;
}

.node-class {
  background: var(--node-class);
  position: relative;
  overflow: hidden;
}

.node-class::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.2);
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
  transition: all 0.3s ease;
}

.node-class:hover::after {
  width: 25px;
  height: 25px;
  background-color: rgba(255, 255, 255, 0.4);
}

.node-assignment {
  background: var(--node-assignment);
}

.node-test {
  background: var(--node-test);
  animation: heartbeat 2s infinite;
}

.node-project {
  background: var(--node-project);
}

.node-essay {
  background: var(--node-essay);
}

.node-image {
  background: var(--node-image);
  padding: 10px;
  width: auto;
  height: auto;
  max-width: 300px;
  max-height: 300px;
}

.node-image img {
  max-width: 100%;
  max-height: 100px; /* Adjust as needed */
  border-radius: 4px;
  margin-top: 8px;
}

.node-idea {
  background: var(--node-idea);
  /* Optional: Add specific animations or styles */
}

/* Node Controls */
.node-controls {
  display: flex;
  justify-content: space-around;
  margin-top: 10px;
  width: 100%;
}

.node-control {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.node-control:hover {
  background-color: var(--accent-primary);
  transform: scale(1.1);
  box-shadow: 0 2px 8px var(--accent-primary-semi-transparent);
  border-color: var(--accent-primary-light);
}

/* Toolbar */
.tree-toolbar {
  position: fixed;
  top: 80px;
  left: 20px;
  z-index: 100;
  background: var(--bg-light);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
  border: 2px solid var(--accent-primary-ultra-light);
}

.dark-mode .tree-toolbar {
  background: var(--bg-dark);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-primary-semi-transparent);
}

.tool-button {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tool-button:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px var(--accent-primary-semi-transparent);
}

.tool-button:active {
  transform: scale(0.95);
}

.tool-button.active {
  box-shadow: 0 0 0 3px var(--accent-primary-light);
  transform: scale(1.05);
}

.tool-button::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 60px;
  background: var(--accent-primary);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 12px var(--accent-primary-semi-transparent);
}

.tool-button:hover::after {
  opacity: 1;
}

/* School menu and submenu */
.school-menu {
  position: relative;
  display: inline-block;
}

.btn-school {
  background: linear-gradient(135deg, #8E44AD, #A569BD);
}

/* Create an invisible path between button and submenu */
.school-menu::after {
  content: '';
  position: absolute;
  top: 25px; /* Half the height of the button */
  left: 50px; /* Width of the button */
  width: 20px; /* Width of the connector */
  height: 2px; /* Height of the connector */
  background-color: transparent; /* Make it invisible */
  z-index: 201; /* Above the submenu */
}

.school-submenu {
  position: absolute;
  left: 60px;
  top: 0;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  padding: 15px;
  z-index: 200;
  display: none;
  flex-direction: column;
  gap: 15px;
  /* Add invisible padding to create a buffer zone */
  margin-left: -10px; /* Pull left to close any gap */
  padding-left: 25px; /* Add extra padding on left side */
  transition: visibility 0s, opacity 0.3s;
  opacity: 0;
  visibility: hidden;
}

.dark-mode .school-submenu {
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.school-menu:hover .school-submenu {
  display: flex;
  opacity: 1;
  visibility: visible;
}

/* Submenu button styles */
.submenu-button {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  color: white;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  position: relative;
}

.submenu-button:hover {
  transform: scale(1.1);
}

.submenu-button:active {
  transform: scale(0.95);
}

.submenu-button::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 55px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.submenu-button:hover::after {
  opacity: 1;
}

/* Button colors matching the node types */
.submenu-button.btn-assignment {
  background: var(--node-assignment);
}

.submenu-button.btn-test {
  background: var(--node-test);
}

.submenu-button.btn-project {
  background: var(--node-project);
}

.submenu-button.btn-essay {
  background: var(--node-essay);
}

/* Button Specific Colors */
.btn-motivator {
  background: var(--node-motivator);
}

.btn-task {
  background: var(--node-task);
}

.btn-challenge {
  background: var(--node-challenge);
}

.btn-class {
  background: var(--node-class);
}

.btn-assignment {
  background: var(--node-assignment);
}

.btn-test {
  background: var(--node-test);
}

.btn-project {
  background: var(--node-project);
}

.btn-essay {
  background: var(--node-essay);
}

.btn-image {
  background: var(--node-image);
}

.btn-idea {
  background: var(--node-idea);
}

.btn-learningObjective {
  background: var(--node-learningObjective);
}

.btn-clear {
  background: #95a5a6;
}

.btn-save {
  background: #2ecc71;
}

.upload-form {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-light);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 20px;
  z-index: 1000;
  display: none;
  transition: background-color var(--transition-speed);
}

.dark-mode .upload-form {
  background: var(--bg-dark);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.upload-form input {
  margin-bottom: 10px;
}

.upload-form button {
  padding: 8px 15px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  box-shadow: 0 2px 6px var(--accent-primary-semi-transparent);
}

.upload-form button:hover {
  background: var(--accent-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-primary-semi-transparent);
}

.upload-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

/* Overlay for dragging connection */
.connection-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 500;
  cursor: crosshair;
  display: none;
}

/* Status Message */
.status-message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-primary);
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 4px 12px var(--accent-primary-semi-transparent);
}

.status-message.show {
  opacity: 1;
}

/* Mini-Map */
.mini-map {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 200px;
  height: 150px;
  background: var(--bg-light);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 100;
  overflow: hidden;
  transition: background-color var(--transition-speed), transform 0.3s;
  display: none;
  border: 2px solid var(--accent-primary-ultra-light);
}

.dark-mode .mini-map {
  background: var(--bg-dark);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-primary-semi-transparent);
}

.mini-map.visible {
  display: block;
  animation: fadeIn 0.3s forwards;
}

.mini-map-viewport {
  position: absolute;
  border: 2px solid var(--accent-primary);
  background: var(--accent-primary-ultra-light);
  pointer-events: none;
}

.mini-map-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--accent-primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 5px 15px var(--accent-primary-semi-transparent);
  z-index: 101;
  transition: transform 0.3s, box-shadow 0.3s;
}

.mini-map-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px var(--accent-primary-semi-transparent);
}

.mini-map-toggle.active {
  transform: scale(1.1) rotate(180deg);
  box-shadow: 0 0 0 3px var(--accent-primary-light);
}

/* Zoom Controls */
.zoom-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  background: var(--bg-light);
  border-radius: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 5px 10px;
  z-index: 100;
  transition: background-color var(--transition-speed);
  border: 2px solid var(--accent-primary-ultra-light);
}

.dark-mode .zoom-controls {
  background: var(--bg-dark);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-primary-semi-transparent);
}

.zoom-controls button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--accent-primary);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px var(--accent-primary-semi-transparent);
}

.zoom-controls button:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px var(--accent-primary-semi-transparent);
}

.zoom-level {
  margin: 0 10px;
  font-weight: 500;
  min-width: 60px;
  text-align: center;
  color: var(--accent-primary);
  font-weight: 600;
}

/* Animations */
@keyframes wobble {
  0% {
    transform: rotate(-1deg);
  }
  100% {
    transform: rotate(1deg);
  }
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.1);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.1);
  }
  70% {
    transform: scale(1);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  100% {
    transform: translateY(-10px);
  }
}

@keyframes appear {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

.appear {
  animation: appear 0.3s forwards;
}

@keyframes updated {
  0% {
    background: inherit;
    box-shadow: var(--node-shadow-light);
  }
  50% {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-light));
    box-shadow: 0 0 20px var(--accent-primary-semi-transparent);
    transform: scale(1.02);
  }
  100% {
    background: inherit;
    box-shadow: var(--node-shadow-light);
    transform: scale(1);
  }
}

.updated {
  animation: updated 1.5s ease-out forwards;
}

/* Media Query */
@media (max-width: 768px) {
  .tree-toolbar {
    bottom: 20px;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 90%;
    max-width: 400px;
  }
  
  .node {
    width: 150px;
    min-height: 50px;
    padding: 10px;
  }
  
  .tool-button {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .tool-button::after {
    display: none;
  }
  
  .mini-map, .mini-map-toggle {
    display: none;
  }
  
  .zoom-controls {
    bottom: auto;
    top: 80px;
  }
}

/* AI Assistant Sidebar */
.ai-sidebar {
  position: fixed;
  right: -350px; /* Start hidden */
  top: 70px; /* Below navbar */
  width: 350px;
  height: calc(100vh - 70px);
  background: var(--bg-light-accent);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 500;
  transition: right 0.4s ease-in-out, background-color var(--transition-speed);
  display: flex;
  flex-direction: column;
}

.ai-sidebar.visible {
  right: 0;
}

.dark-mode .ai-sidebar {
  background: var(--bg-dark-accent);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.ai-header {
  padding: 15px;
  background: var(--accent-primary);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px var(--accent-primary-semi-transparent);
}

.ai-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.ai-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.ai-close-btn:hover {
  transform: scale(1.2);
}

.ai-chat-box {
  flex-grow: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.message {
  margin-bottom: 15px;
  padding: 10px 15px;
  border-radius: 15px;
  max-width: 80%;
  word-wrap: break-word;
  line-height: 1.4;
}

.user-message {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 0;
  align-self: flex-end;
}

.ai-message {
  background: var(--bg-light);
  color: var(--text-dark);
  border-bottom-left-radius: 0;
  align-self: flex-start;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.dark-mode .ai-message {
  background: var(--bg-dark);
  color: var(--text-light);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.ai-message code {
  display: block;
  background: var(--bg-light-accent);
  padding: 10px;
  border-radius: 5px;
  margin-top: 5px;
  font-family: monospace;
  overflow-x: auto;
  white-space: pre-wrap;
}

.dark-mode .ai-message code {
  background: var(--bg-dark-accent);
}

.ai-input-area {
  display: flex;
  padding: 15px;
  border-top: 1px solid var(--bg-light-accent);
  transition: border-color var(--transition-speed);
}

.dark-mode .ai-input-area {
  border-top-color: var(--bg-dark-accent);
}

#ai-input {
  flex-grow: 1;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 20px;
  margin-right: 10px;
  background: var(--bg-light);
  color: var(--text-dark);
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.dark-mode #ai-input {
  background: var(--bg-dark);
  color: var(--text-light);
  border-color: #444;
}

#ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s;
}

#ai-send-btn:hover {
  transform: scale(1.1);
}

.ai-toggle-btn {
  position: fixed;
  right: 20px;
  bottom: 90px; /* Above minimap toggle */
  width: 50px;
  height: 50px;
  background: var(--accent-primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 5px 15px var(--accent-primary-semi-transparent);
  z-index: 101;
  transition: transform 0.3s, box-shadow 0.3s;
}

.ai-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px var(--accent-primary-semi-transparent);
}

.ai-toggle-btn.hidden {
  transform: scale(0);
}

/* Media Query */
@media (max-width: 768px) {
  /* ... existing media query ... */
  .ai-sidebar {
    width: 100%;
    right: -100%; /* Start hidden */
  }
  .ai-sidebar.visible {
    right: 0;
  }
  .ai-toggle-btn {
    bottom: 150px; /* Adjust position */
  }
}

/* Updated Node Hover Panel styles */
.node-hover-panel {
  position: absolute;
  width: 320px;
  background: rgba(25, 28, 32, 0.92);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0;
}

.dark-mode .node-hover-panel {
  background: rgba(15, 17, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.node-hover-panel.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
  animation: panel-appear 0.3s ease;
}

@keyframes panel-appear {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.node-hover-panel::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 20px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid rgba(25, 28, 32, 0.95);
  filter: drop-shadow(-3px 0px 2px rgba(0, 0, 0, 0.1));
}

.dark-mode .node-hover-panel::before {
  border-right-color: rgba(15, 17, 20, 0.95);
}

/* Update node-info - the descriptive part that should be de-emphasized */
.node-info {
  padding: 15px 20px 20px;
  background: rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.node-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, 
    rgba(0, 0, 0, 0) 0%, 
    rgba(0, 0, 0, 0.05) 100%);
  pointer-events: none;
}

.node-info h4 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 15px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.node-info h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: currentColor;
  border-radius: 3px;
}

.dark-mode .node-info h4 {
  color: #e2e2e2;
}

.node-info p {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.65);
  margin: 6px 0;
  max-height: 80px;
  overflow-y: auto;
  transition: max-height 0.3s ease;
}

/* Style for collapsed text */
.node-info.collapsed p {
  max-height: 40px;
  overflow: hidden;
  position: relative;
}

.node-info.collapsed p::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: linear-gradient(to bottom, 
    rgba(0, 0, 0, 0) 0%, 
    rgba(20, 22, 26, 0.95) 100%);
}

/* Improving the node controls section */
.node-hover-panel .node-controls {
  display: flex;
  gap: 12px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  justify-content: center;
}

.node-hover-panel .node-control {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  backdrop-filter: blur(5px);
}

.node-hover-panel .node-control::after {
  content: attr(title);
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}

.node-hover-panel .node-control:hover::after {
  opacity: 1;
}

.node-hover-panel .node-control:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

/* Style the edit interface */
.node-edit-interface {
  margin: 10px 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fade-scale-in 0.25s ease;
}

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

.dark-mode .node-edit-interface {
  background: rgba(255, 255, 255, 0.03);
}

.node-edit-interface label {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: -5px;
}

.node-edit-input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 15px;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}

.node-edit-input:focus {
  border-color: rgba(114, 137, 218, 0.5);
  box-shadow: 0 0 0 2px rgba(114, 137, 218, 0.2);
}

.dark-mode .node-edit-input {
  background: rgba(0, 0, 0, 0.3);
}

.node-edit-buttons {
  display: flex;
  gap: 10px;
  margin-top: 5px;
  justify-content: flex-end;
}

.node-edit-buttons button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.node-edit-save {
  background: #7289da;
  color: white;
}

.node-edit-save:hover {
  background: #5e77d4;
  transform: translateY(-2px);
}

.node-edit-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.node-edit-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.node-edit-remove {
  background: rgba(237, 66, 69, 0.8);
  color: white;
}

.node-edit-remove:hover {
  background: rgba(237, 66, 69, 0.9);
  transform: translateY(-2px);
}

/* Toggle for expanding node info */
.node-info-toggle {
  display: block;
  text-align: center;
  padding: 5px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  cursor: pointer;
  margin-top: 5px;
  transition: color 0.2s ease;
}

.node-info-toggle:hover {
  color: rgba(255, 255, 255, 0.8);
}

.node-info-toggle i {
  margin-left: 5px;
  transition: transform 0.2s ease;
}

.node-info.expanded .node-info-toggle i {
  transform: rotate(180deg);
}

/* Node Features Section */
.node-features {
  padding: 15px 20px 20px;
  background: rgba(0, 0, 0, 0.15);
}

.node-feature-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-button-row {
  display: flex;
  gap: 10px;
}

.feature-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  min-height: 44px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.feature-button i {
  font-size: 16px;
  opacity: 0.9;
}

.feature-button span {
  flex: 1;
  text-align: left;
}

/* Learning Style Panel */
.learning-style-panel {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 15px;
}

.learning-style-panel h4 {
  margin: 0 0 15px 0;
  color: white;
  font-size: 16px;
  font-weight: 600;
}

.learning-style-options {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.style-option {
  flex: 1;
  cursor: pointer;
}

.style-option input[type="radio"] {
  display: none;
}

.option-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.style-option input[type="radio"]:checked + .option-content {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary-light);
  transform: translateY(-1px);
}

.option-content i {
  font-size: 16px;
}

.learning-preferences {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preference-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

.preference-toggle:hover {
  color: white;
}

.pref-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Specific Feature Button Styles */
.breakdown-btn {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.4));
  border-color: rgba(76, 175, 80, 0.3);
}

.breakdown-btn:hover {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(76, 175, 80, 0.5));
}

.ai-assist-btn {
  background: linear-gradient(135deg, rgba(63, 81, 181, 0.2), rgba(63, 81, 181, 0.4));
  border-color: rgba(63, 81, 181, 0.3);
}

.ai-assist-btn:hover {
  background: linear-gradient(135deg, rgba(63, 81, 181, 0.3), rgba(63, 81, 181, 0.5));
}

.vision-btn {
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(156, 39, 176, 0.4));
  border-color: rgba(156, 39, 176, 0.3);
}

.vision-btn:hover {
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.3), rgba(156, 39, 176, 0.5));
}

.progress-btn {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 193, 7, 0.4));
  border-color: rgba(255, 193, 7, 0.3);
}

.progress-btn:hover {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(255, 193, 7, 0.5));
}

.analyze-btn {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.2), rgba(244, 67, 54, 0.4));
  border-color: rgba(244, 67, 54, 0.3);
}

.analyze-btn:hover {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.3), rgba(244, 67, 54, 0.5));
}

.expand-btn {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.2), rgba(255, 152, 0, 0.4));
  border-color: rgba(255, 152, 0, 0.3);
}

.expand-btn:hover {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.3), rgba(255, 152, 0, 0.5));
}

.study-btn {
  background: linear-gradient(135deg, rgba(0, 150, 136, 0.2), rgba(0, 150, 136, 0.4));
  border-color: rgba(0, 150, 136, 0.3);
}

.study-btn:hover {
  background: linear-gradient(135deg, rgba(0, 150, 136, 0.3), rgba(0, 150, 136, 0.5));
}

.resource-btn {
  background: linear-gradient(135deg, rgba(96, 125, 139, 0.2), rgba(96, 125, 139, 0.4));
  border-color: rgba(96, 125, 139, 0.3);
}

.resource-btn:hover {
  background: linear-gradient(135deg, rgba(96, 125, 139, 0.3), rgba(96, 125, 139, 0.5));
}

/* Motivator Features */
.motivator-features h4 {
  margin: 0 0 15px 0;
  color: white;
  font-size: 16px;
  font-weight: 600;
}

.motivator-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Default Features */
.default-features {
  text-align: center;
  padding: 20px;
}

.no-features {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  margin: 0;
}

/* AI Feature Button Styles */
.ai-feature-btn {
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.2));
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.ai-feature-btn:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

.ai-feature-btn::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(45deg, #ff4081, #7c4dff, #00bcd4);
  animation: rotate-gradient 3s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ai-feature-btn:hover::before {
  opacity: 0.8;
}

@keyframes rotate-gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Different colors for different AI buttons */
.challenge-btn i {
  color: #ff4081;
}

.enrich-btn i {
  color: #7c4dff;
}

.explore-btn i {
  color: #00bcd4;
}

/* AI Feature Chat Window */
.ai-feature-chat {
  position: absolute;
  width: 280px;
  max-height: 350px;
  background: rgba(25, 28, 32, 0.95);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  animation: slide-in 0.3s ease-out;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ai-feature-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.ai-feature-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
}

.ai-feature-header h4::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

/* Different header indicators for different features */
.challenge-feature .ai-feature-header h4::before {
  background-color: #ff4081;
  box-shadow: 0 0 10px #ff4081;
}

.enrich-feature .ai-feature-header h4::before {
  background-color: #7c4dff;
  box-shadow: 0 0 10px #7c4dff;
}

.explore-feature .ai-feature-header h4::before {
  background-color: #00bcd4;
  box-shadow: 0 0 10px #00bcd4;
}

.ai-feature-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.ai-feature-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ai-feature-content {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 220px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.ai-feature-content::-webkit-scrollbar {
  width: 6px;
}

.ai-feature-content::-webkit-scrollbar-track {
  background: transparent;
}

.ai-feature-content::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.ai-feature-message {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  max-width: 85%;
  word-break: break-word;
  animation: message-fade-in 0.3s ease-out;
}

@keyframes message-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-feature-message.user-message {
  background: rgba(114, 137, 218, 0.3);
  align-self: flex-end;
  border-radius: 10px 10px 2px 10px;
}

.ai-feature-message.thinking {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
}

.ai-feature-message.thinking::after {
  content: "...";
  animation: thinking-dots 1.5s infinite;
  width: 20px;
}

@keyframes thinking-dots {
  0%, 20% {
    content: ".";
  }
  40%, 60% {
    content: "..";
  }
  80%, 100% {
    content: "...";
  }
}

.ai-feature-input-area {
  display: flex;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-feature-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 20px;
  padding: 8px 15px;
  font-size: 14px;
  color: #fff;
  outline: none;
}

.ai-feature-input:focus {
  box-shadow: 0 0 0 2px rgba(114, 137, 218, 0.3);
}

.ai-feature-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.ai-feature-send {
  background: none;
  border: none;
  color: #7289da;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  margin-left: 5px;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.ai-feature-send:hover {
  background-color: rgba(114, 137, 218, 0.1);
  transform: scale(1.1);
}

/* Special styling for each feature type */
.challenge-feature {
  border-left: 3px solid #ff4081;
}

.enrich-feature {
  border-left: 3px solid #7c4dff;
}

.explore-feature {
  border-left: 3px solid #00bcd4;
}

/* Background glow effect for messages based on feature type */
.challenge-feature .ai-feature-message:not(.user-message) {
  border-left: 2px solid #ff4081;
  box-shadow: -2px 0 10px rgba(255, 64, 129, 0.2);
}

.enrich-feature .ai-feature-message:not(.user-message) {
  border-left: 2px solid #7c4dff;
  box-shadow: -2px 0 10px rgba(124, 77, 255, 0.2);
}

.explore-feature .ai-feature-message:not(.user-message) {
  border-left: 2px solid #00bcd4;
  box-shadow: -2px 0 10px rgba(0, 188, 212, 0.2);
}

/* Node Icon Styles - Updated with better contrast */
.node-icon {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: white;
  font-size: 12px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.dark-mode .node-icon {
  background: #2c2f33;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.node:hover .node-icon {
  transform: scale(1.15);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* Node icon colors based on node type */
.node-motivator .node-icon {
  color: white;
  background: var(--accent-primary);
}

.node-task .node-icon {
  color: white;
  background: #4285F4;
}

.node-challenge .node-icon {
  color: white;
  background: #FF9900;
}

.node-idea .node-icon {
  color: white;
  background: #00bcd4;
}

.node-class .node-icon {
  color: white;
  background: #8E44AD;
}

.node-assignment .node-icon {
  color: white;
  background: #27AE60;
}

.node-test .node-icon {
  color: white;
  background: #E74C3C;
}

.node-project .node-icon {
  color: white;
  background: #16A085;
}

.node-essay .node-icon {
  color: white;
  background: #F1C40F;
}

.node-image .node-icon {
  color: white;
  background: #3498DB;
}

.node-learningObjective .node-icon {
  color: white;
  background: var(--node-learningObjective);
}

/* Dark mode adjustments for icon colors */
.dark-mode .node-icon i {
  color: white !important;
}

/* Voice Recording feature styles */
.btn-voice-record {
  background-color: var(--accent-primary);
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 5px 15px var(--accent-primary-semi-transparent);
  z-index: 101;
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.btn-voice-record i {
  z-index: 2;
  position: relative;
  font-size: 1.6rem;
  pointer-events: none;
}

.btn-voice-record canvas {
  position: absolute;
  left: 5px;
  top: 5px;
  width: 40px;
  height: 40px;
  z-index: 1;
  pointer-events: none;
  display: none;
}

.btn-voice-record.recording {
  box-shadow: 0 0 0 6px var(--accent-primary-ultra-light), 0 5px 15px var(--accent-primary-semi-transparent);
  animation: voice-pulse 1.2s infinite;
}

@keyframes voice-pulse {
  0% {
    box-shadow: 0 0 0 6px var(--accent-primary-ultra-light), 0 5px 15px var(--accent-primary-semi-transparent);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(0, 0, 0, 0), 0 5px 15px var(--accent-primary-semi-transparent);
  }
  100% {
    box-shadow: 0 0 0 6px var(--accent-primary-ultra-light), 0 5px 15px var(--accent-primary-semi-transparent);
  }
}

.btn-voice-record:hover {
  transform: scale(1.1);
}

.voice-recording-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.voice-recording-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.voice-recording-container {
  width: 600px;
  max-width: 90%;
  background-color: var(--bg-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: slide-up 0.5s ease forwards;
}

.dark-mode .voice-recording-container {
  background-color: var(--dark-bg-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@keyframes slide-up {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.voice-recording-header {
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: linear-gradient(120deg, var(--accent-primary), var(--accent-primary-light));
}

.dark-mode .voice-recording-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.voice-recording-header h3 {
  color: white;
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  font-size: 18px;
}

.voice-recording-header h3 i {
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.9);
}

.voice-close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.voice-close-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

.voice-recording-content {
  padding: 20px;
  transition: all 0.3s ease;
}

.voice-recording-content.hidden {
  display: none;
}

.voice-instructions {
  margin-bottom: 20px;
  color: var(--text-color);
  text-align: center;
}

.dark-mode .voice-instructions {
  color: var(--dark-text-color);
}

.voice-tips {
  font-size: 14px;
  opacity: 0.7;
  margin-top: 10px;
}

.voice-tips span {
  background: rgba(124, 77, 255, 0.1);
  padding: 3px 6px;
  border-radius: 4px;
  margin: 0 2px;
  font-style: italic;
  color: #7c4dff;
}

.dark-mode .voice-tips span {
  background: rgba(124, 77, 255, 0.2);
  color: #a58bff;
}

.voice-visualization {
  position: relative;
  margin: 20px 0;
  height: 150px;
  border-radius: 10px;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.dark-mode .voice-visualization {
  background-color: rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.voice-waveform {
  width: 100%;
  height: 100%;
}

.voice-time {
  position: absolute;
  bottom: 10px;
  right: 15px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  font-family: monospace;
}

.voice-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.voice-record-btn, .voice-stop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 50px;
  border: none;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
  gap: 10px;
}

.voice-record-btn {
  background: linear-gradient(to right, #7c4dff, #2979ff);
  min-width: 180px;
}

.voice-record-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(124, 77, 255, 0.3);
}

.voice-record-btn:active {
  transform: translateY(0);
}

.voice-stop-btn {
  background-color: #f44336;
  min-width: 100px;
}

.voice-stop-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

.voice-record-btn.disabled, .voice-stop-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.voice-processing {
  padding: 40px 20px;
  text-align: center;
  animation: fade-in 0.3s ease forwards;
}

.voice-processing.hidden {
  display: none;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.processing-animation {
  margin-bottom: 20px;
}

.processing-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(124, 77, 255, 0.2);
  border-top: 4px solid #7c4dff;
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.processing-text {
  color: var(--text-color);
}

.dark-mode .processing-text {
  color: var(--dark-text-color);
}

.processing-text p {
  margin: 5px 0;
  font-size: 18px;
  font-weight: 500;
}

.processing-subtext {
  opacity: 0.7;
  font-size: 14px !important;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.voice-results {
  padding: 20px;
  animation: fade-in 0.3s ease forwards;
}

.voice-results.hidden {
  display: none;
}

.voice-results h4 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text-color);
  text-align: center;
  font-weight: 600;
}

.dark-mode .voice-results h4 {
  color: var(--dark-text-color);
}

.results-nodes {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 5px;
}

.results-nodes::-webkit-scrollbar {
  width: 8px;
}

.results-nodes::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.results-nodes::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.dark-mode .results-nodes::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.dark-mode .results-nodes::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.result-node {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  border-left: 4px solid #ccc;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  animation: result-appear 0.5s ease forwards;
  animation-delay: calc(var(--index, 0) * 0.1s);
  opacity: 0;
  transform: translateX(-10px);
}

.dark-mode .result-node {
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes result-appear {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.result-node:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .result-node:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.result-node.removing {
  opacity: 0;
  transform: translateX(20px);
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.result-node-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: white;
  flex-shrink: 0;
}

.result-node-content {
  flex-grow: 1;
  overflow: hidden;
}

.result-node-title {
  font-weight: 600;
  margin-bottom: 3px;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dark-mode .result-node-title {
  color: var(--dark-text-color);
}

.result-node-type {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dark-mode .result-node-type {
  color: rgba(255, 255, 255, 0.6);
}

.result-node-due {
  font-size: 12px;
  color: #f44336;
  margin-top: 3px;
}

.result-node-confidence {
  margin: 0 15px;
  width: 80px;
  flex-shrink: 0;
}

.confidence-bar {
  height: 6px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.dark-mode .confidence-bar {
  background-color: rgba(255, 255, 255, 0.1);
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(to right, #2979ff, #7c4dff);
  border-radius: 3px;
}

.result-node-actions {
  display: flex;
  gap: 8px;
}

.result-edit-btn, .result-remove-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background-color: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode .result-edit-btn, .dark-mode .result-remove-btn {
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.result-edit-btn:hover, .result-remove-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.8);
}

.dark-mode .result-edit-btn:hover, .dark-mode .result-remove-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.result-edit-btn:active, .result-remove-btn:active {
  transform: scale(0.95);
}

.result-node-editor {
  width: 100%;
  padding: 5px;
  border: none;
  border-bottom: 2px solid #7c4dff;
  background: transparent;
  font-size: inherit;
  font-weight: 600;
  color: var(--text-color);
  outline: none;
}

.dark-mode .result-node-editor {
  color: var(--dark-text-color);
  border-bottom-color: #a58bff;
}

/* Node type specific border colors */
.result-motivator {
  border-left-color: var(--accent-primary);
}

.result-task {
  border-left-color: #4285F4;
}

.result-challenge {
  border-left-color: #FF9900;
}

.result-idea {
  border-left-color: #00bcd4;
}

.result-class {
  border-left-color: #8E44AD;
}

.result-assignment {
  border-left-color: #27AE60;
}

.result-test {
  border-left-color: #E74C3C;
}

.result-project {
  border-left-color: #16A085;
}

.result-essay {
  border-left-color: #F1C40F;
}

.result-image {
  border-left-color: #3498DB;
}

/* Node type specific icon background colors */
.result-motivator .result-node-icon {
  background-color: var(--accent-primary);
}

.result-task .result-node-icon {
  background-color: #4285F4;
}

.result-challenge .result-node-icon {
  background-color: #FF9900;
}

.result-idea .result-node-icon {
  background-color: #00bcd4;
}

.result-class .result-node-icon {
  background-color: #8E44AD;
}

.result-assignment .result-node-icon {
  background-color: #27AE60;
}

.result-test .result-node-icon {
  background-color: #E74C3C;
}

.result-project .result-node-icon {
  background-color: #16A085;
}

.result-essay .result-node-icon {
  background-color: #F1C40F;
}

.result-image .result-node-icon {
  background-color: #3498DB;
}

.results-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.results-add-all, .results-cancel {
  padding: 10px 20px;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.results-add-all {
  background: linear-gradient(to right, #7c4dff, #2979ff);
  color: white;
  min-width: 140px;
}

.results-add-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(124, 77, 255, 0.3);
}

.results-add-all:active {
  transform: translateY(0);
}

.results-cancel {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.dark-mode .results-cancel {
  color: var(--dark-text-color);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.results-cancel:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .results-cancel:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  .voice-recording-container {
    width: 95%;
  }
  
  .voice-controls {
    flex-direction: column;
    gap: 10px;
  }
  
  .voice-record-btn, .voice-stop-btn {
    width: 100%;
  }
  
  .result-node {
    flex-wrap: wrap;
  }
  
  .result-node-confidence {
    order: 3;
    width: 100%;
    margin: 10px 0 0 0;
  }
  
  .result-node-actions {
    margin-left: auto;
  }
}

/* Tentative node styles */
.node-tentative {
  opacity: 0.8;
  border: 2px dashed rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 15px rgba(124, 77, 255, 0.4);
  transform-origin: center;
  animation: pulse-tentative 2s infinite alternate;
}

.dark-mode .node-tentative {
  border: 2px dashed rgba(255, 255, 255, 0.3);
}

@keyframes pulse-tentative {
  0% {
    box-shadow: 0 0 10px rgba(124, 77, 255, 0.4);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 20px rgba(124, 77, 255, 0.6);
    transform: scale(1.05);
  }
}

.node-tentative::before {
  content: '';
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background-color: #4caf50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: bold;
  z-index: 10;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.dark-mode .node-tentative::before {
  border-color: var(--dark-bg-color);
}

.node-tentative.removing {
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

/* Node approval UI */
.node-approval {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  z-index: 5;
  min-width: 130px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(124, 77, 255, 0.2);
}

.dark-mode .node-approval {
  background: rgba(40, 44, 52, 0.95);
  border: 1px solid rgba(124, 77, 255, 0.3);
}

.node-confidence {
  display: flex;
  flex-direction: column;
  margin-right: 10px;
  min-width: 60px;
}

.node-confidence .confidence-bar {
  height: 4px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 2px;
}

.dark-mode .node-confidence .confidence-bar {
  background-color: rgba(255, 255, 255, 0.1);
}

.node-confidence .confidence-fill {
  height: 100%;
  background: linear-gradient(to right, #2979ff, #7c4dff);
  border-radius: 2px;
}

.node-confidence span {
  font-size: 10px;
  color: rgba(0, 0, 0, 0.6);
  text-align: left;
}

.dark-mode .node-confidence span {
  color: rgba(255, 255, 255, 0.6);
}

.approval-actions {
  display: flex;
  gap: 5px;
}

.approval-actions button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.2s;
}

.approval-actions button:hover {
  transform: scale(1.1);
}

.approval-actions .approve-btn {
  background-color: #4caf50;
}

.approval-actions .edit-btn {
  background-color: #2196f3;
}

.approval-actions .dismiss-btn {
  background-color: #f44336;
}

/* Global suggestions bar */
.node-suggestions-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  min-width: 320px;
  backdrop-filter: blur(10px);
  animation: slide-up-bar 0.5s ease forwards;
  border: 2px solid var(--accent-primary-ultra-light);
}

.dark-mode .node-suggestions-bar {
  background: rgba(40, 44, 52, 0.9);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  border-color: var(--accent-primary-semi-transparent);
}

@keyframes slide-up-bar {
  from {
    transform: translate(-50%, 100px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.suggestions-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.suggestions-info i {
  font-size: 18px;
  color: var(--accent-primary);
}

.suggestions-info span {
  font-weight: 500;
  color: var(--text-color);
}

.dark-mode .suggestions-info span {
  color: var(--dark-text-color);
}

.suggestions-actions {
  display: flex;
  gap: 10px;
}

.suggestions-actions button {
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.approve-all-btn {
  background-color: #4caf50;
  color: white;
}

.approve-all-btn:hover {
  background-color: #43a047;
  transform: translateY(-2px);
}

.dismiss-all-btn {
  background-color: transparent;
  color: #f44336;
  border: 1px solid #f44336 !important;
}

.dismiss-all-btn:hover {
  background-color: rgba(244, 67, 54, 0.1);
}

@media (max-width: 768px) {
  .node-suggestions-bar {
    flex-direction: column;
    gap: 10px;
    border-radius: 15px;
    width: 90%;
    padding: 15px;
  }
  
  .suggestions-actions {
    width: 100%;
    justify-content: center;
  }
  
  .suggestions-actions button {
    flex: 1;
    justify-content: center;
  }
}

/* Area Select Button */
.btn-area-select {
  background: rgba(60, 60, 60, 0.12);
  border: none;
  border-radius: 8px;
  color: #444;
  margin-left: 8px;
  transition: background 0.2s, color 0.2s;
  font-size: 1.1em;
}
.btn-area-select:hover, .btn-area-select.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-primary-semi-transparent);
}

/* Area Selection Rectangle */
.area-select-rect {
  position: absolute;
  z-index: 1000;
  border: 2px dashed var(--accent-primary);
  background: var(--accent-primary-ultra-light);
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Area Select Exit Bubble */
.area-select-bubble {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  border: 1px solid var(--accent-primary-ultra-light);
}

.area-select-bubble:hover {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary-light);
}

.dark-mode .learning-submenu {
  background: rgba(30, 30, 35, 0.95);
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.5);
}

.learning-menu:hover .learning-submenu {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

.learning-menu:hover::after {
  opacity: 1;
}

/* New node types */
.node-keyidea {
  background: var(--node-keyidea);
}

.node-question {
  background: var(--node-question);
}

.node-problemtype {
  background: var(--node-problemtype);
}

.node-nhscredit {
  background: var(--node-nhscredit);
  position: relative;
  overflow: hidden;
}

.node-nhscredit::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 20px 20px 0;
  border-color: transparent rgba(255, 255, 255, 0.3) transparent transparent;
  transition: all 0.3s ease;
}

.node-nhscredit:hover::after {
  border-width: 0 30px 30px 0;
  border-color: transparent rgba(255, 255, 255, 0.5) transparent transparent;
}

.node-nhscredit:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 30px rgba(46, 204, 113, 0.3);
  z-index: 10;
}

.dark-mode .node-nhscredit:hover {
  box-shadow: 0 15px 30px rgba(46, 204, 113, 0.4);
}

/* Node icons for the new types */
.node-keyidea .node-icon {
  color: #9c27b0;
}

.node-question .node-icon {
  color: #ff5722;
}

.node-problemtype .node-icon {
  color: #009688;
}

/* Button styles for the new node types */
.btn-key-idea {
  background-color: #9c27b0;
}

.btn-question {
  background-color: #ff5722;
}

.btn-problem-type {
  background-color: #009688;
}

/* Node hover panel special features for learning nodes */
.node-keyidea .learn-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #9c27b0, #ce93d8);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  margin-top: 10px;
  cursor: pointer;
  border: 1px solid #e0e0e0;
  opacity: 0.97;
  transition: background 0.2s, color 0.2s;
}
.area-select-bubble:hover {
  background: #4285F4;
  color: #fff;
}

/* --- FORCE ZOOM CONTROLS TO BE CLICKABLE AND ON TOP --- */
.zoom-controls, .zoom-controls * {
  pointer-events: auto !important;
  z-index: 10000 !important;
}

/* Added node styles */
.node-learningObjective {
  background: var(--node-learningObjective);
}

.node-keyidea {
  background: var(--node-keyidea);
}

.node-question {
  background: var(--node-question);
}

.node-problemtype {
  background: var(--node-problemtype);
}

.node-nhscredit {
  background: var(--node-nhscredit);
}

/* Added button styles */
.btn-learningObjective {
  background: var(--node-learningObjective);
}

.btn-keyidea {
  background: var(--node-keyidea);
}

.btn-question {
  background: var(--node-question);
}

.btn-problemtype {
  background: var(--node-problemtype);
}

.btn-nhscredit {
 background: var(--node-nhscredit);
}

/* Learning Objective Node Specifics */
.node-learningObjective .learning-objective-status {
  position: absolute;
  bottom: 8px; /* Adjust as needed */
  right: 8px; /* Adjust as needed */
  font-size: 1em; /* Adjust as needed */
  color: white; /* Or a color that contrasts with the node background */
  padding: 3px;
  background-color: rgba(0,0,0,0.2);
  border-radius: 50%;
  width: 20px; /* Adjust to fit icon */
  height: 20px; /* Adjust to fit icon */
  display: flex;
  align-items: center;
  justify-content: center;
}

.node-learningObjective.voice-active {
  /* Optional: style for when voice mode is active, e.g., a glowing border */
  box-shadow: 0 0 15px 5px var(--node-learningObjective), 0 10px 20px rgba(0, 0, 0, 0.4); /* Combine with existing dark shadow or adjust */
}

/* Interactive Tutorial System Styles */
.tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20000;
  background: linear-gradient(135deg, 
    rgba(15, 32, 39, 0.15) 0%, 
    rgba(32, 58, 67, 0.1) 50%, 
    rgba(44, 83, 100, 0.15) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: tutorial-fade-in 1s ease-out forwards;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
  pointer-events: none; /* Allow clicks to pass through to toolbar */
}

.tutorial-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(78, 205, 196, 0.1) 0%, transparent 50%);
  animation: tutorial-bg-shift 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes tutorial-bg-shift {
  0%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
  33% { transform: translateX(30px) translateY(-20px) rotate(1deg); }
  66% { transform: translateX(-20px) translateY(30px) rotate(-1deg); }
}

@keyframes tutorial-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tutorial-content {
  position: relative;
  max-width: 600px;
  width: 90%;
  z-index: 2;
  pointer-events: auto; /* Re-enable pointer events for tutorial content */
}

.tutorial-step {
  display: none;
  animation: tutorial-step-enter 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.tutorial-step.active {
  display: block;
}

@keyframes tutorial-step-enter {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tutorial-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .tutorial-card {
  background: rgba(25, 28, 35, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tutorial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    rgba(255, 255, 255, 0) 100%);
  animation: tutorial-shimmer 4s infinite;
  pointer-events: none;
}

@keyframes tutorial-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.tutorial-header {
  padding: 30px 30px 20px;
  text-align: center;
  position: relative;
  background: var(--tutorial-primary);
  color: white;
  margin: -1px -1px 0 -1px;
  border-radius: 24px 24px 0 0;
}

.tutorial-header::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: inherit;
  border-radius: 50%;
  z-index: -1;
}

.tutorial-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  display: inline-block;
  animation: tutorial-icon-bounce 2s infinite;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

@keyframes tutorial-icon-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.tutorial-header h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.5px;
}

.tutorial-body {
  padding: 40px 30px 30px;
  color: #333;
  line-height: 1.6;
}

.dark-mode .tutorial-body {
  color: #e0e0e0;
}

.tutorial-body p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  font-weight: 400;
}

.tutorial-features {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 25px 0;
}

.feature-preview {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 12px;
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.feature-preview:hover {
  background: rgba(102, 126, 234, 0.15);
  transform: translateX(5px);
}

.feature-preview i {
  font-size: 1.5rem;
  color: #667eea;
  width: 30px;
  text-align: center;
}

.feature-preview span {
  font-weight: 500;
  color: #333;
}

.dark-mode .feature-preview span {
  color: #e0e0e0;
}

.tutorial-instruction {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9ff 0%, #e8f4fd 100%);
  border-radius: 16px;
  margin: 20px 0;
  border: 2px solid rgba(102, 126, 234, 0.2);
  position: relative;
  overflow: hidden;
}

.dark-mode .tutorial-instruction {
  background: linear-gradient(135deg, #2a2d3a 0%, #3a3f4f 100%);
  border-color: rgba(102, 126, 234, 0.3);
}

.tutorial-instruction::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(102, 126, 234, 0) 0%, 
    rgba(102, 126, 234, 0.1) 50%, 
    rgba(102, 126, 234, 0) 100%);
  animation: instruction-highlight 3s infinite;
}

@keyframes instruction-highlight {
  0% { left: -100%; }
  100% { left: 100%; }
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--tutorial-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  animation: step-number-pulse 2s infinite;
}

@keyframes step-number-pulse {
  0% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); }
  50% { box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6); }
  100% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); }
}

.tutorial-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: rgba(78, 205, 196, 0.1);
  border-radius: 12px;
  border-left: 4px solid #4ecdc4;
  margin: 20px 0;
  font-style: italic;
}

.tutorial-tip i {
  color: #4ecdc4;
  font-size: 1.2rem;
}

.tutorial-actions {
  padding: 20px 30px 30px;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.tutorial-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  justify-content: center;
}

.tutorial-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.3) 50%, 
    rgba(255, 255, 255, 0) 100%);
  transition: left 0.6s;
}

.tutorial-btn:hover::before {
  left: 100%;
}

.tutorial-btn.primary {
  background: var(--tutorial-primary);
  color: white;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.tutorial-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.tutorial-btn.secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #666;
  border: 2px solid rgba(102, 126, 234, 0.3);
}

.tutorial-btn.secondary:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
}

.tutorial-btn.celebration-btn {
  background: var(--tutorial-celebration);
  animation: celebration-glow 2s infinite;
}

@keyframes celebration-glow {
  0%, 100% { box-shadow: 0 8px 25px rgba(255, 154, 158, 0.4); }
  50% { box-shadow: 0 12px 35px rgba(255, 154, 158, 0.6); }
}

.tutorial-hint {
  text-align: center;
  font-style: italic;
  color: #667eea;
  font-weight: 500;
  animation: hint-pulse 2s infinite;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Tutorial Features Grid */
.tutorial-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(102, 126, 234, 0.15);
  transform: scale(1.05);
}

.feature-item i {
  color: #667eea;
  font-size: 1.2rem;
}

/* Tutorial Progress */
.tutorial-progress {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 25px;
  padding: 15px 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 21000;
}

.dark-mode .tutorial-progress {
  background: rgba(25, 28, 35, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar {
  width: 200px;
  height: 6px;
  background: rgba(102, 126, 234, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--tutorial-primary);
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.6) 50%, 
    rgba(255, 255, 255, 0) 100%);
  animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.step-counter {
  text-align: center;
  font-weight: 600;
  color: #667eea;
  font-size: 0.9rem;
}

.tutorial-skip {
  position: fixed;
  top: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 21000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.tutorial-skip:hover {
  background: rgba(244, 67, 54, 0.9);
  color: white;
  transform: scale(1.1);
}

/* Tutorial Demo Elements */
.tutorial-demo {
  text-align: center;
  margin: 20px 0;
}

.voice-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  color: white;
  border-radius: 25px;
  font-weight: 500;
  animation: voice-demo-pulse 1.5s infinite;
}

@keyframes voice-demo-pulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.7);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 0 10px rgba(78, 205, 196, 0);
    transform: scale(1.05);
  }
}

.voice-indicator i {
  animation: microphone-bounce 1s infinite alternate;
}

@keyframes microphone-bounce {
  0% { transform: scale(1); }
  100% { transform: scale(1.2); }
}

/* Tutorial Achievements */
.tutorial-achievements {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 25px 0;
}

.achievement {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(78, 205, 196, 0.1);
  border-radius: 10px;
  border-left: 4px solid #4ecdc4;
  animation: achievement-appear 0.6s ease-out forwards;
}

.achievement i {
  color: #4ecdc4;
  font-size: 1.2rem;
}

.achievement span {
  font-weight: 500;
}

@keyframes achievement-appear {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Tutorial Celebration Card */
.tutorial-card.celebration {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(255, 250, 250, 0.95) 100%);
  border: 2px solid rgba(255, 154, 158, 0.3);
}

.tutorial-card.celebration .tutorial-header {
  background: var(--tutorial-celebration);
  animation: celebration-header 3s infinite;
}

@keyframes celebration-header {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Tutorial Spotlight Effect */
.tutorial-spotlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%), 
      rgba(0, 0, 0, 0) 0%, 
      rgba(0, 0, 0, 0) 150px, 
      rgba(0, 0, 0, 0.3) 300px, 
      rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
  z-index: 1;
  transition: all 0.8s ease;
  opacity: 0;
}

.tutorial-spotlight.active {
  opacity: 1;
}

/* Dynamic spotlight system */
.tutorial-overlay.has-spotlight {
  background: 
    radial-gradient(circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%), 
      transparent 0px, 
      transparent var(--spotlight-size, 120px), 
      rgba(15, 32, 39, 0.25) calc(var(--spotlight-size, 120px) + 80px),
      rgba(15, 32, 39, 0.35) calc(var(--spotlight-size, 120px) + 150px)),
    linear-gradient(135deg, 
      rgba(15, 32, 39, 0.15) 0%, 
      rgba(32, 58, 67, 0.1) 50%, 
      rgba(44, 83, 100, 0.15) 100%);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add subtle spotlight ring animation */
.tutorial-overlay.has-spotlight::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%), 
    rgba(102, 126, 234, 0.3) calc(var(--spotlight-size, 120px) - 10px),
    rgba(102, 126, 234, 0.1) calc(var(--spotlight-size, 120px) + 10px),
    transparent calc(var(--spotlight-size, 120px) + 30px));
  animation: spotlight-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes spotlight-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Position tutorial content dynamically */
.tutorial-overlay.spotlight-left .tutorial-content {
  margin-left: auto;
  margin-right: 8%;
  max-width: 450px;
}

.tutorial-overlay.spotlight-right .tutorial-content {
  margin-left: 8%;
  margin-right: auto;
  max-width: 450px;
}

.tutorial-overlay.spotlight-center .tutorial-content {
  margin-left: auto;
  margin-right: auto;
  max-width: 600px;
}

/* Ensure toolbar has higher z-index during tutorial */
body.tutorial-active .tree-toolbar {
  z-index: 21000 !important;
  box-shadow: 
    0 0 0 3px rgba(102, 126, 234, 0.6),
    0 5px 20px rgba(102, 126, 234, 0.4),
    0 0 30px rgba(102, 126, 234, 0.3);
  animation: toolbar-highlight-pulse 2s infinite;
}

@keyframes toolbar-highlight-pulse {
  0%, 100% { 
    box-shadow: 
      0 0 0 3px rgba(102, 126, 234, 0.6),
      0 5px 20px rgba(102, 126, 234, 0.4),
      0 0 30px rgba(102, 126, 234, 0.3);
  }
  50% { 
    box-shadow: 
      0 0 0 6px rgba(102, 126, 234, 0.8),
      0 5px 25px rgba(102, 126, 234, 0.6),
      0 0 40px rgba(102, 126, 234, 0.5);
  }
}

/* Special highlighting for specific buttons during tutorial */
body.tutorial-active .btn-motivator,
body.tutorial-active .btn-learningObjective {
  position: relative;
  animation: button-tutorial-pulse 2s infinite;
  z-index: 21001 !important;
}

body.tutorial-active .btn-motivator::before,
body.tutorial-active .btn-learningObjective::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(45deg, #667eea, #764ba2, #667eea);
  border-radius: 15px;
  z-index: -1;
  animation: button-glow-rotate 3s linear infinite;
}

@keyframes button-tutorial-pulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.8);
  }
  50% { 
    transform: scale(1.1);
    box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
  }
}

@keyframes button-glow-rotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .tutorial-content {
    width: 95%;
    max-width: none;
  }
  
  .tutorial-card {
    border-radius: 16px;
  }
  
  .tutorial-header {
    padding: 20px 20px 15px;
  }
  
  .tutorial-icon {
    font-size: 2.5rem;
  }
  
  .tutorial-header h2 {
    font-size: 1.5rem;
  }
  
  .tutorial-body {
    padding: 30px 20px 20px;
  }
  
  .tutorial-actions {
    padding: 15px 20px 20px;
    flex-direction: column;
  }
  
  .tutorial-btn {
    width: 100%;
  }
  
  .tutorial-features-grid {
    grid-template-columns: 1fr;
  }
  
  .tutorial-progress {
    bottom: 20px;
    padding: 10px 20px;
  }
  
  .progress-bar {
    width: 150px;
  }
  
  .tutorial-skip {
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

/* Tutorial Step Transitions */
.tutorial-step.exiting {
  animation: tutorial-step-exit 0.4s ease-in forwards;
}

@keyframes tutorial-step-exit {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px) scale(0.9);
  }
}