:root {
  --background: 232 54% 9%;
  --foreground: 214 42% 94%;
  --primary: 166 72% 58%;
  --primary-foreground: 225 54% 8%;
  --secondary: 266 72% 68%;
  --secondary-foreground: 0 0% 100%;
  --muted: 226 28% 24%;
  --muted-foreground: 220 22% 76%;
  --destructive: 350 78% 65%;
  --destructive-foreground: 0 0% 100%;
  --border: 224 28% 31%;
  --card: 230 42% 15%;
  --shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.38);
  --transition-fast: 160ms ease;
  --transition-smooth: 420ms cubic-bezier(.2,.8,.2,1);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
}

.dark {
  --background: 228 62% 5%;
  --foreground: 218 48% 96%;
  --primary: 158 78% 62%;
  --secondary: 253 74% 72%;
  --muted: 228 34% 16%;
  --muted-foreground: 220 24% 78%;
  --border: 228 28% 24%;
  --card: 230 48% 10%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
}

button, a, input { -webkit-tap-highlight-color: transparent; }

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, hsla(var(--secondary), 0.36), transparent 34%),
    radial-gradient(circle at 84% 22%, hsla(var(--primary), 0.22), transparent 30%),
    linear-gradient(155deg, hsl(224 64% 12%) 0%, hsl(254 55% 16%) 52%, hsl(270 52% 20%) 100%);
}

.night-shell {
  background:
    radial-gradient(circle at 50% 0%, hsl(229 64% 16%), transparent 44%),
    linear-gradient(165deg, hsl(228 68% 4%), hsl(237 54% 8%) 55%, hsl(260 50% 10%));
}

.glass {
  background: hsla(var(--card), 0.66);
  border: 1px solid hsla(var(--border), 0.7);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.soft-card {
  background: hsla(var(--card), 0.58);
  border: 1px solid hsla(var(--border), 0.55);
  box-shadow: var(--shadow-sm);
}

.breathing-orb {
  animation: breatheOrb 7.2s ease-in-out infinite;
}

.breathing-orb-fast {
  animation: breatheOrb 5.8s ease-in-out infinite;
}

.orb-glow {
  box-shadow: 0 0 36px hsla(var(--primary), 0.34), inset 0 0 40px hsla(var(--secondary), 0.24);
}

@keyframes breatheOrb {
  0%, 100% { transform: scale(0.82); opacity: 0.78; }
  50% { transform: scale(1.16); opacity: 1; }
}

.float-slow { animation: floatSlow 6s ease-in-out infinite; }
@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.progress-ring {
  transform: rotate(-90deg);
}

.safe-bottom { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }

input::placeholder { color: hsla(var(--muted-foreground), 0.7); }

.focus-ring:focus-visible {
  outline: 3px solid hsla(var(--primary), 0.42);
  outline-offset: 3px;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }