/* ============================================================
   aimag.me — Liquid Glass Design System
   Phase 10: GUI Rebuild (2026-02-23)
   ============================================================ */

/* === BASE & RESET === */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  background-color: var(--space-bg);
}

/* === CSS CUSTOM PROPERTIES === */
:root {
  /* Space palette */
  --space-bg: #0d0221;
  --space-900: #120330;
  --space-800: #1a0544;
  --space-700: #240046;
  --space-600: #3c096c;

  /* Neon accents */
  --neon-violet: #9d4edd;
  --neon-magenta: #c77dff;
  --neon-cyan: #00f5ff;

  /* Gold */
  --gold: #d4a853;
  --gold-light: #e8c97a;
  --gold-dim: #a07d3a;

  /* Glass tokens */
  --glass-blur: 16px;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);
  --glass-bg-active: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-border-hover: rgba(255, 255, 255, 0.18);
  --glass-border-active: rgba(255, 255, 255, 0.25);
  --glass-radius: 1.5rem;
  --glass-radius-sm: 1rem;
  --glass-radius-lg: 2rem;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Text */
  --text-primary: #f1f0fb;
  --text-secondary: #a5a3c8;
  --text-muted: rgba(165, 163, 200, 0.6);
}

/* Light mode overrides */
:root:not(.dark) {
  --space-bg: #faf8f5;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-hover: rgba(255, 255, 255, 0.85);
  --glass-bg-active: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-hover: rgba(0, 0, 0, 0.15);
  --glass-border-active: rgba(0, 0, 0, 0.20);
  --text-primary: #1a1625;
  --text-secondary: #6b6587;
  --text-muted: rgba(107, 101, 135, 0.6);
}

/* === GLASS COMPONENT LIBRARY === */

/* Glass Panel — primary card/container */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 8px 32px rgba(0, 0, 0, 0.2);
  transition:
    border-color 0.3s var(--ease-smooth),
    box-shadow 0.3s var(--ease-smooth),
    transform 0.3s var(--ease-smooth);
}

.glass-panel:hover {
  border-color: var(--glass-border-hover);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 12px 40px rgba(0, 0, 0, 0.25);
}

.glass-panel-interactive:hover {
  transform: translateY(-2px);
  border-color: var(--glass-border-active);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 16px 48px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(157, 78, 221, 0.1);
}

/* Light mode glass adjustments */
:root:not(.dark) .glass-panel {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.03) inset,
    0 4px 16px rgba(0, 0, 0, 0.06);
}

:root:not(.dark) .glass-panel:hover {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.05) inset,
    0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Glass Button — primary CTA */
.glass-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #fff;
  background: linear-gradient(135deg, var(--neon-violet), var(--neon-magenta));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--glass-radius-sm);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease-spring),
    box-shadow 0.3s var(--ease-smooth);
  box-shadow:
    0 0 20px rgba(157, 78, 221, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.glass-button:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow:
    0 0 40px rgba(157, 78, 221, 0.5),
    0 8px 24px rgba(157, 78, 221, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.glass-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 0 15px rgba(157, 78, 221, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.glass-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Glass Button shimmer overlay */
.glass-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transition: left 0.6s var(--ease-smooth);
}

.glass-button:hover::before {
  left: 100%;
}

/* Glass Button Secondary — outline variant */
.glass-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius-sm);
  cursor: pointer;
  transition:
    background 0.2s var(--ease-smooth),
    border-color 0.2s var(--ease-smooth),
    transform 0.2s var(--ease-spring),
    box-shadow 0.3s var(--ease-smooth);
}

.glass-button-secondary:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.glass-button-secondary:active {
  transform: scale(0.97);
}

/* Glass Input */
.glass-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius-sm);
  outline: none;
  transition:
    border-color 0.2s var(--ease-smooth),
    box-shadow 0.2s var(--ease-smooth);
}

.glass-input::placeholder {
  color: var(--text-muted);
}

.glass-input:focus {
  border-color: var(--neon-violet);
  box-shadow:
    0 0 0 3px rgba(157, 78, 221, 0.15),
    0 0 20px rgba(157, 78, 221, 0.1);
}

/* Glass Pill / Badge */
.glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  transition:
    background 0.2s var(--ease-smooth),
    border-color 0.2s var(--ease-smooth),
    color 0.2s var(--ease-smooth);
}

.glass-pill:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  color: var(--text-primary);
}

.glass-pill.is-active {
  background: linear-gradient(135deg, var(--neon-violet), var(--neon-magenta));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 12px rgba(157, 78, 221, 0.3);
}

/* Glass Navigation */
.glass-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 8px 32px rgba(0, 0, 0, 0.3);
}

:root:not(.dark) .glass-nav {
  background: rgba(255, 255, 255, 0.7);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.03) inset,
    0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Glass Island (mobile bottom tab) */
.glass-island {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius-lg);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 -4px 24px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(157, 78, 221, 0.08);
}

:root:not(.dark) .glass-island {
  background: rgba(255, 255, 255, 0.8);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.03) inset,
    0 -2px 12px rgba(0, 0, 0, 0.06);
}

/* === CARD FLIP ANIMATION (enhanced) === */
.card-container {
  perspective: 1200px;
}

.card-inner {
  transition: transform 0.8s var(--ease-spring);
  transform-style: preserve-3d;
}

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

.card-front,
.card-back {
  backface-visibility: hidden;
  position: absolute;
  inset: 0;
}

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

/* Card glow on reveal */
@keyframes card-reveal-glow {
  0% { box-shadow: 0 0 0 rgba(157, 78, 221, 0); }
  50% { box-shadow: 0 0 30px rgba(157, 78, 221, 0.4), 0 0 60px rgba(157, 78, 221, 0.15); }
  100% { box-shadow: 0 0 15px rgba(157, 78, 221, 0.15); }
}

.card-revealed {
  animation: card-reveal-glow 1s var(--ease-smooth) forwards;
}

/* Card back mandala pattern */
.card-back-pattern {
  background:
    radial-gradient(circle at 50% 50%, rgba(157, 78, 221, 0.2) 0%, transparent 70%),
    linear-gradient(135deg, var(--space-700), var(--neon-violet));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
}

/* === ANIMATION LIBRARY === */

/* Portal Pulse — hero portal animation */
@keyframes portal-pulse {
  0%, 100% {
    box-shadow:
      0 0 60px rgba(157, 78, 221, 0.3),
      0 0 120px rgba(157, 78, 221, 0.15),
      inset 0 0 60px rgba(157, 78, 221, 0.1);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 80px rgba(199, 125, 255, 0.4),
      0 0 160px rgba(157, 78, 221, 0.2),
      inset 0 0 80px rgba(199, 125, 255, 0.15);
    transform: scale(1.02);
  }
}

.portal-pulse {
  animation: portal-pulse 4s ease-in-out infinite;
}

/* Cosmic Drift — slow background gradient animation */
@keyframes cosmic-drift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.cosmic-drift {
  background-size: 200% 200%;
  animation: cosmic-drift 15s ease-in-out infinite;
}

/* Glow Pulse (enhanced) */
@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(157, 78, 221, 0.4), 0 0 80px rgba(157, 78, 221, 0.1);
  }
}

.glow {
  animation: glow-pulse 3s ease-in-out infinite;
}

/* Float animations */
@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

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

.animate-float-slow {
  animation: float-gentle 6s ease-in-out infinite;
}

.animate-float-delay-1 { animation: float-gentle 5s ease-in-out 0.5s infinite; }
.animate-float-delay-2 { animation: float-gentle 4.5s ease-in-out 1s infinite; }
.animate-float-delay-3 { animation: float-gentle 5.5s ease-in-out 1.5s infinite; }

/* Fade In Up */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
  animation: fade-in-up 0.6s var(--ease-out-expo) forwards;
}

/* Spring In — bouncy entrance */
@keyframes spring-in {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); }
  60% { opacity: 1; transform: translateY(-4px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.spring-in {
  animation: spring-in 0.6s var(--ease-spring) forwards;
}

/* Reveal Up — page content entrance */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal-up {
  animation: reveal-up 0.5s var(--ease-smooth) forwards;
}

/* Shimmer Glass — glass surface highlight */
@keyframes shimmer-glass {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer-glass {
  background: linear-gradient(
    90deg,
    transparent 25%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 75%
  );
  background-size: 200% 100%;
  animation: shimmer-glass 2s infinite;
}

/* Pre-animation state for scroll-triggered elements */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger > * { opacity: 0; }
.stagger.is-visible > *:nth-child(1) { animation: spring-in 0.5s var(--ease-spring) 0ms forwards; }
.stagger.is-visible > *:nth-child(2) { animation: spring-in 0.5s var(--ease-spring) 100ms forwards; }
.stagger.is-visible > *:nth-child(3) { animation: spring-in 0.5s var(--ease-spring) 200ms forwards; }
.stagger.is-visible > *:nth-child(4) { animation: spring-in 0.5s var(--ease-spring) 300ms forwards; }
.stagger.is-visible > *:nth-child(5) { animation: spring-in 0.5s var(--ease-spring) 400ms forwards; }
.stagger.is-visible > *:nth-child(6) { animation: spring-in 0.5s var(--ease-spring) 500ms forwards; }

/* Skeleton Loading (glass variant) */
.skeleton {
  background: linear-gradient(
    90deg,
    transparent 25%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 75%
  );
  background-size: 200% 100%;
  animation: shimmer-glass 1.5s infinite;
}

:root:not(.dark) .skeleton {
  background: linear-gradient(
    90deg,
    transparent 25%,
    rgba(0, 0, 0, 0.04) 50%,
    transparent 75%
  );
  background-size: 200% 100%;
}

/* === TYPEWRITER === */
.typewriter-cursor::after {
  content: '|';
  animation: blink-neon 1s step-end infinite;
  margin-left: 2px;
  color: var(--neon-violet);
  text-shadow: 0 0 8px rgba(157, 78, 221, 0.5);
}

@keyframes blink-neon {
  50% { opacity: 0; }
}

/* === INTERPRETATION LAYERS === */
.interpretation-essence {
  position: relative;
  overflow: hidden;
}

.interpretation-essence::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212,168,83,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.interpretation-narrative {
  position: relative;
}

.interpretation-cards .glass-panel-interactive {
  transition: transform 0.2s var(--ease-spring), box-shadow 0.3s var(--ease-smooth);
}

.interpretation-cards .glass-panel-interactive:hover {
  box-shadow: 0 0 20px rgba(0,245,255,0.15);
}

.interpretation-action {
  position: relative;
  overflow: hidden;
}

.interpretation-action::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--neon-cyan), transparent);
  border-radius: 2px;
}

/* Card Modal Overlay */
#card-modal {
  animation: fade-in-up 0.2s var(--ease-smooth) forwards;
}

/* === COSMIC STAR PARTICLES === */
@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.5); }
}

.star {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.star-1 { top: 8%; left: 5%; width: 3px; height: 3px; background: rgba(255,255,255,0.5);
  animation: twinkle 3s ease-in-out infinite, float-gentle 6s ease-in-out infinite; }
.star-2 { top: 15%; right: 10%; width: 2px; height: 2px; background: rgba(157,78,221,0.6);
  animation: twinkle 4s ease-in-out 0.5s infinite, float-gentle 5s ease-in-out 0.3s infinite; }
.star-3 { top: 35%; left: 15%; width: 3px; height: 3px; background: rgba(255,255,255,0.4);
  animation: twinkle 3.5s ease-in-out 1s infinite, float-gentle 7s ease-in-out 0.7s infinite; }
.star-4 { top: 25%; right: 20%; width: 4px; height: 4px; background: rgba(0,245,255,0.4);
  animation: twinkle 5s ease-in-out 1.5s infinite, float-gentle 4.5s ease-in-out 1s infinite; }
.star-5 { bottom: 30%; left: 25%; width: 2px; height: 2px; background: rgba(212,168,83,0.5);
  animation: twinkle 4.5s ease-in-out 2s infinite, float-gentle 5.5s ease-in-out 0.5s infinite; }
.star-6 { top: 50%; right: 8%; width: 3px; height: 3px; background: rgba(199,125,255,0.5);
  animation: twinkle 3.8s ease-in-out 0.8s infinite, float-gentle 6.5s ease-in-out 0.2s infinite; }
.star-7 { top: 70%; left: 8%; width: 2px; height: 2px; background: rgba(255,255,255,0.3);
  animation: twinkle 4.2s ease-in-out 1.2s infinite, float-gentle 5.8s ease-in-out 0.9s infinite; }
.star-8 { bottom: 15%; right: 30%; width: 3px; height: 3px; background: rgba(0,245,255,0.3);
  animation: twinkle 3.3s ease-in-out 1.8s infinite, float-gentle 6.2s ease-in-out 1.3s infinite; }
.star-9 { top: 45%; left: 40%; width: 2px; height: 2px; background: rgba(157,78,221,0.4);
  animation: twinkle 5.5s ease-in-out 0.3s infinite, float-gentle 7.5s ease-in-out 0.6s infinite; }
.star-10 { bottom: 40%; right: 15%; width: 4px; height: 4px; background: rgba(212,168,83,0.3);
  animation: twinkle 4.8s ease-in-out 2.5s infinite, float-gentle 5.2s ease-in-out 1.6s infinite; }
.star-11 { top: 12%; left: 55%; width: 2px; height: 2px; background: rgba(255,255,255,0.35);
  animation: twinkle 3.7s ease-in-out 1.4s infinite, float-gentle 6.8s ease-in-out 0.4s infinite; }
.star-12 { bottom: 20%; left: 60%; width: 3px; height: 3px; background: rgba(199,125,255,0.35);
  animation: twinkle 4.4s ease-in-out 0.9s infinite, float-gentle 5.4s ease-in-out 1.1s infinite; }

/* === HERO GRADIENT === */
.hero-gradient {
  background: linear-gradient(180deg, #0d0221 0%, #1a0544 40%, #240046 70%, #3c096c 100%);
  position: relative;
}

.hero-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 50% at 50% 40%,
    rgba(157, 78, 221, 0.12) 0%,
    transparent 100%
  );
  pointer-events: none;
}

:root:not(.dark) .hero-gradient {
  background: linear-gradient(180deg, #faf8f5 0%, #f0ecff 50%, #e8e0ff 100%);
}

:root:not(.dark) .hero-gradient::after {
  background: radial-gradient(
    ellipse 60% 50% at 50% 40%,
    rgba(124, 91, 245, 0.06) 0%,
    transparent 100%
  );
}

/* === PORTAL ELEMENT === */
.portal {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(199, 125, 255, 0.15) 0%, rgba(157, 78, 221, 0.08) 40%, transparent 70%),
    radial-gradient(circle, rgba(0, 245, 255, 0.05) 0%, transparent 60%);
  border: 1px solid rgba(157, 78, 221, 0.2);
  position: relative;
}

.portal::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid rgba(199, 125, 255, 0.15);
  animation: portal-pulse 4s ease-in-out infinite;
}

.portal::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 245, 255, 0.08);
  animation: portal-pulse 4s ease-in-out 2s infinite;
}

@media (min-width: 768px) {
  .portal { width: 360px; height: 360px; }
}

/* Portal intention color variants */
.portal[data-intention="peace"] {
  background:
    radial-gradient(circle, rgba(0, 245, 255, 0.15) 0%, rgba(0, 245, 255, 0.05) 40%, transparent 70%),
    radial-gradient(circle, rgba(157, 78, 221, 0.05) 0%, transparent 60%);
  border-color: rgba(0, 245, 255, 0.2);
}
.portal[data-intention="peace"]::before { border-color: rgba(0, 245, 255, 0.15); }
.portal[data-intention="peace"]::after { border-color: rgba(0, 245, 255, 0.08); }

.portal[data-intention="answers"] {
  background:
    radial-gradient(circle, rgba(199, 125, 255, 0.2) 0%, rgba(157, 78, 221, 0.1) 40%, transparent 70%),
    radial-gradient(circle, rgba(199, 125, 255, 0.08) 0%, transparent 60%);
  border-color: rgba(199, 125, 255, 0.25);
}
.portal[data-intention="answers"]::before { border-color: rgba(199, 125, 255, 0.2); }
.portal[data-intention="answers"]::after { border-color: rgba(199, 125, 255, 0.1); }

.portal[data-intention="courage"] {
  background:
    radial-gradient(circle, rgba(212, 168, 83, 0.15) 0%, rgba(212, 168, 83, 0.06) 40%, transparent 70%),
    radial-gradient(circle, rgba(199, 125, 255, 0.05) 0%, transparent 60%);
  border-color: rgba(212, 168, 83, 0.2);
}
.portal[data-intention="courage"]::before { border-color: rgba(212, 168, 83, 0.15); }
.portal[data-intention="courage"]::after { border-color: rgba(212, 168, 83, 0.08); }

.portal[data-intention="inspiration"] {
  background:
    radial-gradient(circle, rgba(157, 78, 221, 0.18) 0%, rgba(0, 245, 255, 0.08) 40%, transparent 70%),
    radial-gradient(circle, rgba(212, 168, 83, 0.06) 0%, transparent 60%);
  border-color: rgba(157, 78, 221, 0.25);
}
.portal[data-intention="inspiration"]::before { border-color: rgba(157, 78, 221, 0.2); }
.portal[data-intention="inspiration"]::after { border-color: rgba(0, 245, 255, 0.1); }

/* Smooth transition for portal color changes */
.portal,
.portal::before,
.portal::after {
  transition: background 0.6s var(--ease-smooth), border-color 0.6s var(--ease-smooth);
}

/* === NEON TEXT === */
.neon-text-violet {
  color: var(--neon-violet);
  text-shadow: 0 0 10px rgba(157, 78, 221, 0.3);
}

.neon-text-cyan {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

.neon-text-gold {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(212, 168, 83, 0.3);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--neon-violet), var(--neon-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-cosmic {
  background: linear-gradient(135deg, var(--neon-magenta), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === SECTION DIVIDER === */
.section-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--glass-border),
    transparent
  );
}

/* === STEPS CONNECTOR === */
.steps-connector {
  position: relative;
}

.steps-connector::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 28px;
  right: 28px;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--neon-violet),
    var(--neon-cyan)
  );
  opacity: 0.3;
}

@media (max-width: 768px) {
  .steps-connector::before {
    top: 28px;
    left: 50%;
    right: auto;
    width: 2px;
    height: calc(100% - 56px);
    background: linear-gradient(
      to bottom,
      var(--neon-violet),
      var(--neon-cyan)
    );
  }
}

/* === HAMBURGER MENU === */
.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 1px;
}

.hamburger.is-active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* === MOBILE MENU === */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s var(--ease-smooth);
}

.mobile-menu.is-open {
  transform: translateX(0);
}

/* === SCROLLBAR (Dark Mode) === */
.dark ::-webkit-scrollbar,
.dark::-webkit-scrollbar {
  width: 8px;
}

.dark ::-webkit-scrollbar-track,
.dark::-webkit-scrollbar-track {
  background: transparent;
}

.dark ::-webkit-scrollbar-thumb,
.dark::-webkit-scrollbar-thumb {
  background: rgba(157, 78, 221, 0.25);
  border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb:hover,
.dark::-webkit-scrollbar-thumb:hover {
  background: rgba(157, 78, 221, 0.45);
}

/* === COOKIE CONSENT === */
.cookie-banner {
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-smooth);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

/* === BUTTON GLOW === */
.btn-glow {
  position: relative;
}

.btn-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 0 24px rgba(157, 78, 221, 0.4);
  pointer-events: none;
}

.btn-glow:hover::after {
  opacity: 1;
}

/* === STEP NUMBER === */
.step-number {
  position: relative;
}

.step-number::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(157, 78, 221, 0.3);
}

/* === GLASS TOGGLE SWITCH === */
.glass-toggle {
  width: 2.75rem;
  height: 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition:
    background 0.3s var(--ease-smooth),
    border-color 0.3s var(--ease-smooth);
}

.glass-toggle.is-on {
  background: linear-gradient(135deg, var(--neon-violet), var(--neon-magenta));
  border-color: transparent;
  box-shadow: 0 0 12px rgba(157, 78, 221, 0.3);
}

.glass-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.125rem;
  height: 1.125rem;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s var(--ease-spring);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.glass-toggle.is-on::after {
  transform: translateX(1.25rem);
}

/* === NAV SCROLL STATE (floating glass) === */
.glass-nav {
  transition:
    border-color 0.3s var(--ease-smooth),
    box-shadow 0.3s var(--ease-smooth),
    background 0.3s var(--ease-smooth);
}

.glass-nav.nav-scrolled {
  border-color: var(--glass-border-hover);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 12px 40px rgba(0, 0, 0, 0.35);
}

:root:not(.dark) .glass-nav.nav-scrolled {
  border-color: var(--glass-border-hover);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04) inset,
    0 8px 24px rgba(0, 0, 0, 0.1);
}

/* === NAV GHOST LINK (hover glow) === */
.nav-ghost-link {
  position: relative;
}

.nav-ghost-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s var(--ease-smooth);
  box-shadow: 0 0 12px rgba(157, 78, 221, 0.15);
  pointer-events: none;
}

.nav-ghost-link:hover::after {
  opacity: 1;
}

/* === BOTTOM TAB BAR === */
.bottom-tab {
  color: var(--text-secondary);
  position: relative;
}

.bottom-tab:hover {
  color: var(--text-primary);
}

.bottom-tab-active {
  color: var(--neon-cyan);
}

.bottom-tab-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(0, 245, 255, 0.4);
}

:root:not(.dark) .bottom-tab-active {
  color: var(--neon-violet);
}

:root:not(.dark) .bottom-tab-active::after {
  background: var(--neon-violet);
  box-shadow: 0 0 8px rgba(157, 78, 221, 0.3);
}

/* === PAGE TRANSITION === */
#main-content {
  animation: reveal-up 0.5s var(--ease-smooth) forwards;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .hero-gradient {
    min-height: calc(100vh - 80px);
    min-height: calc(100dvh - 80px);
  }
}

/* Mobile bottom bar padding for body */
@media (max-width: 768px) {
  body {
    padding-bottom: 5rem;
  }
}

/* === MICRO-INTERACTIONS === */

/* Button press spring */
.glass-button:active,
.glass-button-secondary:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

/* Link hover neon underline */
a.neon-link {
  text-decoration: none;
  background-image: linear-gradient(var(--neon-violet), var(--neon-magenta));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease-smooth);
}
a.neon-link:hover {
  background-size: 100% 2px;
}

/* Focus ring — neon glow instead of default outline */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--space-bg), 0 0 0 4px var(--neon-violet), 0 0 12px rgba(157, 78, 221, 0.3);
}

/* Glass panel hover glow pulse */
.glass-panel-interactive {
  position: relative;
}
.glass-panel-interactive::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(157,78,221,0.1), rgba(0,245,255,0.05));
  opacity: 0;
  transition: opacity 0.3s var(--ease-smooth);
  pointer-events: none;
  z-index: -1;
}
.glass-panel-interactive:hover::after {
  opacity: 1;
}

/* Gold star hover glow */
.star-btn {
  transition: color 0.2s, transform 0.2s var(--ease-spring), filter 0.2s;
}
.star-btn:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 8px rgba(212, 168, 83, 0.6));
}

/* === ACCESSIBILITY: REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
