/* Premium Brain Slider Interactive Section */
.brain-slider-section {
  padding: 8rem 0;
  background-color: var(--color-surface);
  transition: background-color 0.8s ease;
  overflow: hidden;
  position: relative;
}

.brain-slider-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.brain-slider-icon-wrapper {
  width: 100%;
  max-width: 320px; /* Reduced max width on mobile */
  position: relative;
  aspect-ratio: 1 / 1;
}

#rainbowz-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  /* Soft shadow for the entire SVG area */
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.04));
}

/* Entry Animation Classes */
.ripple-enter {
  opacity: 0;
  transform: scale(0.8);
  transform-origin: center;
  animation: ripple-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#center-group.ripple-enter {
  animation-delay: 0.1s;
}

#skill-memory.ripple-enter { animation-delay: 0.2s; }
#skill-focus.ripple-enter { animation-delay: 0.3s; }
#skill-observation.ripple-enter { animation-delay: 0.4s; }
#skill-thinking-speed.ripple-enter { animation-delay: 0.5s; }
#skill-creativity.ripple-enter { animation-delay: 0.6s; }
#skill-imagination.ripple-enter { animation-delay: 0.7s; }

@keyframes ripple-in {
  0% { opacity: 0; transform: scale(0.8) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Center Logo Pulse */
#center-logo-glow {
  opacity: 0;
  transition: opacity 0.5s ease;
}

#center-logo-glow.pulse {
  animation: center-pulse 0.6s ease-out;
}

@keyframes center-pulse {
  0% { opacity: 0; transform: scale(0.9); }
  50% { opacity: 0.5; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1); }
}

/* Outer Circles */
.skill-circle {
  cursor: pointer;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.skill-circle circle.circle-bg {
  transition: fill 0.4s ease, filter 0.4s ease;
}

.skill-circle:hover {
  transform: scale(1.1);
}

.skill-circle.active {
  transform: scale(1.35);
  filter: drop-shadow(0 10px 20px currentColor);
}

/* Connecting Lines */
#connecting-lines line {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#connecting-lines line.active-line {
  opacity: 1;
  stroke-dashoffset: 0;
  /* Animate from circle to center */
  animation: draw-line-to-center 0.6s ease forwards;
}

@keyframes draw-line-to-center {
  0% { stroke-dashoffset: 100; }
  100% { stroke-dashoffset: 0; }
}

/* Premium Content Card */
.brain-slider-content {
  background: white;
  padding: 2.5rem 1.5rem; /* Reduced padding on mobile */
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05),
              0 1px 3px rgba(0, 0, 0, 0.02);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 550px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.02);
  transform: translateY(0);
}

#brain-slider-panel {
  opacity: 0;
  transform: translateY(20px);
  /* Use faster, smooth curve for transitions */
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
}

#brain-slider-panel.activate {
  opacity: 1;
  transform: translateY(0);
}

#brain-slider-panel h3 {
  font-size: 1.8rem; /* Reduced font size for mobile */
  margin-bottom: 1rem;
  transition: color 0.4s ease;
  letter-spacing: -0.03em;
}

#brain-slider-panel p {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  color: var(--color-text-off);
  line-height: 1.7;
}

.btn-skill-unlock {
  border: none;
  font-size: 1.05rem;
  padding: 14px 32px;
  color: white;
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-skill-unlock:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

@media (min-width: 900px) {
  .brain-slider-layout {
    flex-direction: row;
    max-width: 1100px;
    align-items: center;
    gap: 6rem; /* Increased spacing */
  }
  
  .brain-slider-content {
    flex: 1;
    min-height: 320px;
    padding: 3.5rem; /* Resets to larger padding for desktop */
  }

  #brain-slider-panel h3 {
    font-size: 2.2rem; /* Restore font size for desktop */
  }
  
  .brain-slider-icon-wrapper {
    flex: 1;
    max-width: 480px; /* Make slightly larger on desktop */
  }
}
