:root {
  --background: 254 67% 7%;
  --foreground: 222 45% 96%;
  --primary: 286 100% 68%;
  --secondary: 188 100% 62%;
  --muted: 229 28% 76%;
  --destructive: 350 90% 62%;
  --border: 256 38% 29%;
  --card: 254 48% 13%;
  --shadow-sm: 0 8px 22px rgba(0,0,0,.22);
  --shadow-md: 0 18px 48px rgba(109, 72, 255, .24);
  --shadow-lg: 0 24px 80px rgba(211, 64, 255, .32);
  --transition-fast: 160ms ease;
  --transition-smooth: 320ms cubic-bezier(.2,.8,.2,1);
  --radius-sm: .75rem;
  --radius-md: 1.15rem;
  --radius-lg: 1.75rem;
}

.dark {
  --background: 254 67% 7%;
  --foreground: 222 45% 96%;
  --primary: 286 100% 68%;
  --secondary: 188 100% 62%;
  --muted: 229 28% 76%;
  --destructive: 350 90% 62%;
  --border: 256 38% 29%;
  --card: 254 48% 13%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, select, textarea, input { font: inherit; font-size: max(16px, 1rem); }
button { -webkit-tap-highlight-color: transparent; }

.stars,
.stars::before,
.stars::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.95) 0 1px, transparent 1.7px),
    radial-gradient(circle at 74% 13%, rgba(118,247,255,.9) 0 1px, transparent 1.8px),
    radial-gradient(circle at 44% 72%, rgba(255,126,249,.88) 0 1px, transparent 1.7px),
    radial-gradient(circle at 86% 66%, rgba(255,255,255,.75) 0 1px, transparent 1.6px),
    radial-gradient(circle at 10% 82%, rgba(255,255,255,.72) 0 1px, transparent 1.6px);
  background-size: 260px 260px;
  opacity: .7;
}
.stars::before { transform: scale(1.6); opacity: .32; filter: blur(.2px); }
.stars::after { transform: scale(2.2); opacity: .22; filter: blur(.6px); }

.aurora {
  position: fixed;
  width: 52rem;
  height: 52rem;
  border-radius: 999px;
  filter: blur(80px);
  opacity: .38;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: drift 12s ease-in-out infinite alternate;
}
.aurora-one { left: -18rem; top: -16rem; background: radial-gradient(circle, hsl(var(--primary)), transparent 62%); }
.aurora-two { right: -20rem; bottom: -18rem; background: radial-gradient(circle, hsl(var(--secondary)), transparent 60%); animation-delay: -4s; }

.glass-card {
  border: 1px solid hsl(var(--border));
  background: linear-gradient(145deg, hsl(var(--card) / .78), hsl(var(--card) / .42));
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}
.logo-orb {
  background: conic-gradient(from 180deg, hsl(var(--secondary)), hsl(var(--primary)), #ffffff, hsl(var(--secondary)));
  color: #080515;
}
.cosmic-button {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)) 54%, #ffffff 130%);
  position: relative;
  overflow: hidden;
}
.cosmic-button::after {
  content: "";
  position: absolute;
  inset: -80% -30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  transform: translateX(-70%) rotate(18deg);
  transition: transform var(--transition-smooth);
}
.cosmic-button:hover::after { transform: translateX(70%) rotate(18deg); }
.cosmic-button:active { transform: translateY(1px) scale(.99); }
.spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.skeleton {
  background: linear-gradient(90deg, hsl(var(--card)), hsl(var(--primary) / .18), hsl(var(--card)));
  background-size: 220% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -220% 0; } }
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(5vw,3vh,0) scale(1.08); }
}

::selection { background: hsl(var(--primary) / .4); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
