:root {
  --background: 224 32% 95%;
  --foreground: 225 30% 13%;
  --primary: 210 98% 67%;
  --secondary: 286 73% 72%;
  --muted: 220 24% 88%;
  --muted-foreground: 223 14% 42%;
  --destructive: 0 80% 62%;
  --border: 224 25% 78%;
  --card: 0 0% 100%;
  --shadow-sm: 0 10px 24px rgba(23, 32, 90, 0.08);
  --shadow-md: 0 18px 40px rgba(20, 28, 72, 0.14);
  --shadow-lg: 0 24px 80px rgba(17, 22, 56, 0.2);
  --transition-fast: 180ms ease;
  --transition-smooth: 360ms cubic-bezier(0.22, 1, 0.36, 1);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 30px;
}

.dark {
  --background: 228 28% 8%;
  --foreground: 210 24% 96%;
  --primary: 195 100% 70%;
  --secondary: 281 84% 76%;
  --muted: 228 18% 16%;
  --muted-foreground: 220 12% 72%;
  --destructive: 0 82% 66%;
  --border: 224 18% 24%;
  --card: 225 26% 12%;
  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.16);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html, body, #root {
  min-height: 100%;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
  background:
    radial-gradient(circle at top left, hsla(var(--primary), 0.16), transparent 28%),
    radial-gradient(circle at 80% 18%, hsla(var(--secondary), 0.13), transparent 24%),
    linear-gradient(180deg, hsl(var(--background)), hsl(var(--background)));
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: hsla(var(--foreground), 0.16);
  border-radius: 999px;
}

.glass-panel {
  background: linear-gradient(180deg, hsla(var(--card), 0.78), hsla(var(--card), 0.44));
  border: 1px solid hsla(var(--border), 0.72);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(26px) saturate(155%);
  -webkit-backdrop-filter: blur(26px) saturate(155%);
}

.primary-btn,
.secondary-btn,
.icon-btn,
.nav-chip {
  transition: transform var(--transition-fast), background var(--transition-smooth), border-color var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast), opacity var(--transition-fast);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  background: linear-gradient(135deg, hsla(var(--primary), 0.92), hsla(var(--secondary), 0.88));
  color: black;
  font-weight: 600;
  box-shadow: 0 12px 30px hsla(var(--primary), 0.24);
}

.primary-btn:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 20px 40px hsla(var(--primary), 0.32);
}

.primary-btn:active {
  transform: translateY(0px) scale(0.995);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 999px;
  padding: 0.85rem 1.15rem;
  border: 1px solid hsla(var(--border), 0.72);
  background: hsla(var(--card), 0.54);
  color: hsl(var(--foreground));
  backdrop-filter: blur(12px);
}

.secondary-btn:hover,
.icon-btn:hover,
.nav-chip:hover {
  transform: translateY(-1px);
  background: hsla(var(--primary), 0.1);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid hsla(var(--border), 0.7);
  background: hsla(var(--card), 0.64);
  color: hsl(var(--foreground));
  backdrop-filter: blur(16px);
}

.nav-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  border: 1px solid hsla(var(--border), 0.64);
  background: hsla(var(--card), 0.55);
  color: hsl(var(--foreground));
  font-size: 0.92rem;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(16px);
  opacity: 0.7;
}

.orb-a {
  top: -3rem;
  left: -2rem;
  width: 16rem;
  height: 16rem;
  background: radial-gradient(circle, hsla(var(--primary), 0.28), transparent 70%);
  animation: floatY 12s ease-in-out infinite;
}

.orb-b {
  top: 18%;
  right: -3rem;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, hsla(var(--secondary), 0.24), transparent 68%);
  animation: floatY 16s ease-in-out infinite reverse;
}

.orb-c {
  bottom: 10%;
  left: 30%;
  width: 14rem;
  height: 14rem;
  background: radial-gradient(circle, hsla(var(--primary), 0.14), transparent 68%);
  animation: floatY 14s ease-in-out infinite;
}

.grid-fade {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(hsla(var(--border), 0.1) 1px, transparent 1px),
    linear-gradient(90deg, hsla(var(--border), 0.1) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
  opacity: 0.4;
}

.noise {
  position: absolute;
  inset: -40px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: 0.07;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.sheen {
  position: absolute;
  inset: -1px;
  background: linear-gradient(110deg, transparent 10%, hsla(var(--foreground), 0.14) 20%, transparent 34%);
  transform: translateX(-60%);
  animation: sheenSweep 1.2s ease-out both;
}

input::placeholder {
  color: hsl(var(--muted-foreground));
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid hsla(var(--primary), 0.7);
  outline-offset: 2px;
}

@keyframes floatY {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-16px);
  }
}

@keyframes sheenSweep {
  0% {
    transform: translateX(-70%);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translateX(70%);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb-a,
  .orb-b,
  .orb-c,
  .sheen {
    animation: none !important;
  }
}

@media (min-width: 768px) {
  .orb-a {
    width: 22rem;
    height: 22rem;
  }

  .orb-b {
    width: 24rem;
    height: 24rem;
  }
}
