@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* Tailwind-inspired theme (ported from previous project) */
:root {
  --color-primary-50: #eff6ff;
  --color-primary-100: #dbeafe;
  --color-primary-200: #bfdbfe;
  --color-primary-300: #93c5fd;
  --color-primary-400: #60a5fa;
  --color-primary-500: #3b82f6;
  --color-primary-600: #2563eb;
  --color-primary-700: #1d4ed8;
  --color-primary-800: #1e40af;
  --color-primary-900: #1e3a8a;
  --color-primary-950: #172554;

  --color-accent-cyan: #06b6d4;
  --color-accent-cyan-light: #22d3ee;
  --color-accent-cyan-dark: #0891b2;

  --color-accent-purple: #a855f7;
  --color-accent-purple-light: #c084fc;
  --color-accent-purple-dark: #9333ea;

  --color-accent-emerald: #10b981;
  --color-accent-emerald-light: #34d399;
  --color-accent-emerald-dark: #059669;

  --shadow-glow-sm: 0 0 10px rgba(59, 130, 246, 0.5);
  --shadow-glow-md: 0 0 20px rgba(59, 130, 246, 0.5);
  --shadow-glow-lg: 0 0 30px rgba(59, 130, 246, 0.5);
  --shadow-neural: 0 0 30px rgba(59, 130, 246, 0.3), 0 0 60px rgba(168, 85, 247, 0.2);

  --neural-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #a855f7 100%);
  --glow-color: rgba(59, 130, 246, 0.4);

  --animate-gradient: gradient 8s linear infinite;
  --animate-float: float 6s ease-in-out infinite;
  --animate-glow: glow 2s ease-in-out infinite alternate;

  --font-base: 'Space Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

@keyframes gradient {
  0%, 100% {
    background-size: 200% 200%;
    background-position: left center;
  }
  50% {
    background-size: 200% 200%;
    background-position: right center;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(2deg);
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.3);
  }
  100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8), 0 0 40px rgba(59, 130, 246, 0.4);
  }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes neural-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes button-pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-base);
}

body {
  background-color: #ffffff;
  color: #111827;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #030712;
    color: #e5e7eb;
    background-image:
      radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 45%),
      radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 45%);
  }
}

::selection {
  background: rgba(59, 130, 246, 0.3);
  color: #1e3a8a;
}

@media (prefers-color-scheme: dark) {
  ::selection { color: #dbeafe; }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background-color: #f3f4f6; }
::-webkit-scrollbar-thumb {
  background-image: linear-gradient(to bottom, #60a5fa, #2563eb);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background-image: linear-gradient(to bottom, #3b82f6, #1d4ed8);
}

.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(229, 231, 235, 0.5);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(229, 231, 235, 0.6);
}

@media (prefers-color-scheme: dark) {
  .glass { background: rgba(17, 24, 39, 0.7); border-color: rgba(55, 65, 81, 0.5); }
  .glass-strong { background: rgba(17, 24, 39, 0.9); border-color: rgba(55, 65, 81, 0.6); }
}

.neural-bg {
  background: var(--neural-gradient);
  background-size: 200% 200%;
  animation: gradient 8s ease infinite;
}

.grid-pattern {
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

.gradient-text {
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #a855f7);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient 3s linear infinite;
}

.glow-effect {
  position: relative;
}

.glow-effect::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4, #a855f7);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-effect:hover::before { opacity: 1; }

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

.neural-line { animation: neural-pulse 2s ease-in-out infinite; }

.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.card-hover:hover {
  box-shadow: var(--shadow-neural);
  transform: translateY(-6px);
}

.btn-pulse { animation: button-pulse 2s infinite; }

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

.animate-ping {
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-primary-500), 0 0 0 4px #ffffff;
}

@media (prefers-color-scheme: dark) {
  :focus-visible { box-shadow: 0 0 0 2px var(--color-primary-500), 0 0 0 4px #030712; }
}

@media (prefers-color-scheme: dark) {
  ::-webkit-scrollbar-track { background-color: #111827; }
}

@media (max-width: 640px) { html { font-size: 14px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
