/* Syllovo Creator Hub - Custom Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

code, pre, .font-mono {
  font-family: var(--font-mono);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.dark ::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

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

/* Heading Anchor Link Hover */
.heading-anchor {
  position: relative;
  scroll-margin-top: 5rem;
}

.heading-anchor .anchor-link {
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(-4px);
  text-decoration: none;
}

.heading-anchor:hover .anchor-link {
  opacity: 1;
  transform: translateX(0);
}

/* Glassmorphism Classes */
.glass-panel {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dark .glass-panel {
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Animated Pulse Gradients */
.glow-primary {
  box-shadow: 0 0 25px -5px rgba(59, 130, 246, 0.35);
}

.glow-accent {
  box-shadow: 0 0 25px -5px rgba(16, 185, 129, 0.35);
}

/* Waveform Canvas Simulation */
@keyframes waveMotion {
  0% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
  100% { transform: scaleY(0.3); }
}

.wave-bar {
  animation: waveMotion 1.2s ease-in-out infinite;
  transform-origin: bottom;
}

/* Keyframes for animated highlighting in the 3-area animation demo */
@keyframes focusPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.6);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(56, 189, 248, 0);
  }
}

.animate-focus-pulse {
  animation: focusPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Reading Progress Bar */
#reading-progress {
  transition: width 0.1s ease-out;
}

/* Smooth dark mode transitions */
body, aside, header, div, nav, section {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toast Notification Animation */
@keyframes toastIn {
  from {
    transform: translateY(100%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes toastOut {
  from {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateY(100%) scale(0.9);
    opacity: 0;
  }
}

.toast-enter {
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-exit {
  animation: toastOut 0.2s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}
