:root {
  /* Common Spacing & Layout */
  --spacing-base: 1rem;
  --transition-speed: 0.6s; /* Slightly slower for a more majestic transition */
  --stamp-speed: 0.8s;
  
  --parchment-bg: hsl(40, 25%, 94%);
  --neon-bg: hsl(230, 25%, 2%);
}

/* Parchment Theme */
[data-theme='parchment'] {
  --bg-color: var(--parchment-bg); 
  --text-primary: hsl(40, 10%, 15%);
  --text-secondary: hsl(40, 5%, 40%);
  --font-primary: 'EB Garamond', 'Georgia', serif;
  
  --texture-opacity-parchment: 1;
  --texture-opacity-neon: 0;
...
  --card-bg: transparent;
  --card-border: none;

  /* No animations in Parchment */
  --theme-animation: none;
  --header-animation: none;
}

/* Neon / Glassmorphism Theme */
[data-theme='neon'] {
  --bg-color: var(--neon-bg);
  --text-primary: hsl(180, 100%, 85%);
  --text-secondary: hsl(180, 20%, 65%);
  --font-primary: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --texture-opacity-parchment: 0;
  --texture-opacity-neon: 1;
...
  /* Glassmorphism Surface - Slightly more translucent to show the pattern */
  --card-bg: hsla(230, 25%, 8%, 0.6);
  --card-border: 1px solid hsla(180, 100%, 50%, 0.3);
  
  /* Vibrant Cyan Glow */
  --surface-shadow-inner: 0 0 20px hsla(180, 100%, 50%, 0.1),
                         inset 0 0 15px hsla(180, 100%, 50%, 0.1);
  
  --surface-shadow-outer: 0 0 30px hsla(180, 100%, 50%, 0.2);

  /* Neon Glow Text */
  --text-accent-shadow: 0 0 8px hsla(180, 100%, 50%, 0.8);

  /* Animation Hook - Surging Glow */
  --theme-animation: neonPulse 4.5s infinite ease-in-out;
  --header-animation: neonTextPulse 4.5s infinite ease-in-out;
}

@keyframes neonPulse {
  0%, 100% {
    text-shadow: 0 0 8px hsla(180, 100%, 50%, 0.6),
                 0 0 12px hsla(180, 100%, 50%, 0.2);
    box-shadow: var(--surface-shadow-inner);
    filter: brightness(1);
  }
  50% {
    text-shadow: 0 0 15px hsla(180, 100%, 50%, 0.9),
                 0 0 25px hsla(180, 100%, 50%, 0.4);
    box-shadow: 0 0 40px hsla(180, 100%, 50%, 0.3),
                inset 0 0 20px hsla(180, 100%, 50%, 0.2);
    filter: brightness(1.2);
  }
}

@keyframes neonTextPulse {
  0%, 100% {
    text-shadow: 0 0 8px hsla(180, 100%, 50%, 0.6),
                 0 0 12px hsla(180, 100%, 50%, 0.2);
    filter: brightness(1);
  }
  50% {
    text-shadow: 0 0 15px hsla(180, 100%, 50%, 0.9),
                 0 0 25px hsla(180, 100%, 50%, 0.4);
    filter: brightness(1.2);
  }
}
