@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  --bg-dark: #0f111a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.05);

  --primary: #10B981;
  /* Emerald */
  --primary-glow: rgba(16, 185, 129, 0.5);
  --secondary: #06b6d4;
  /* Cyan */
  --secondary-glow: rgba(6, 182, 212, 0.5);
  --accent: #00F0FF;
  /* Cyan */

  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;

  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(255, 255, 255, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

/* Prevent avatar/image flash before Tailwind utility runtime attaches */
.object-cover {
  object-fit: cover;
}

.rounded-full {
  border-radius: 9999px;
}

.w-6 {
  width: 1.5rem;
}

.h-6 {
  height: 1.5rem;
}

.w-8 {
  width: 2rem;
}

.h-8 {
  height: 2rem;
}

.w-10 {
  width: 2.5rem;
}

.h-10 {
  height: 2.5rem;
}

.w-12 {
  width: 3rem;
}

.h-12 {
  height: 3rem;
}

.w-16 {
  width: 4rem;
}

.h-16 {
  height: 4rem;
}

.w-20 {
  width: 5rem;
}

.h-20 {
  height: 5rem;
}

.w-24 {
  width: 6rem;
}

.h-24 {
  height: 6rem;
}

.w-32 {
  width: 8rem;
}

.h-32 {
  height: 8rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Glassmorphism Utilities */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
}

.glass-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 14px 0 var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 var(--primary-glow);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.btn-accent {
  background: linear-gradient(135deg, var(--secondary) 0%, #0891b2 100%);
  color: white;
  box-shadow: 0 4px 14px 0 var(--secondary-glow);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 var(--secondary-glow);
}

/* Text Gradients */
.text-gradient {
  background: linear-gradient(to right, #10B981, #00F0FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-coral {
  background: linear-gradient(to right, #FF6B6B, #0891b2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animations */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

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

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.animate-pulse-glow {
  animation: pulse-glow 2s infinite;
}

/* Background Effects */
.bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
  border-radius: 50%;
  pointer-events: none;
}

/* Layout Utilities */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--text-main);
}


/* Light Mode Variables */
:root[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --border-color: rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] body {
  background-color: var(--bg-dark);
  color: #0f111a;
}

:root[data-theme="light"] .glass,
:root[data-theme="light"] .glass-panel {
  background: var(--bg-card);
  border-color: var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .glass:hover,
:root[data-theme="light"] .glass-panel:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 0, 0, 0.2);
}

:root[data-theme="light"] .text-white,
:root[data-theme="light"] .text-gray-100,
:root[data-theme="light"] .text-gray-200,
:root[data-theme="light"] .text-gray-300 {
  color: #0f111a !important;
}

:root[data-theme="light"] .text-gray-400 {
  color: #4b5563 !important;
}

:root[data-theme="light"] .bg-\[\#0f111a\],
:root[data-theme="light"] .bg-gray-800,
:root[data-theme="light"] .bg-black\/20,
:root[data-theme="light"] .bg-black\/40,
:root[data-theme="light"] .bg-black\/50,
:root[data-theme="light"] .bg-\[\#1f2937\] {
  background-color: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

:root[data-theme="light"] .border-white\/10,
:root[data-theme="light"] .border-white\/5,
:root[data-theme="light"] .border-white\/20,
:root[data-theme="light"] .border-\[\#0077b5\]\/30 {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

:root[data-theme="light"] .bg-\[\#0f111a\]\/80,
:root[data-theme="light"] .bg-\[\#0f111a\]\/90 {
  background-color: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

:root[data-theme="light"] .bg-black\/30 {
  background-color: #f1f5f9 !important;
}

:root[data-theme="light"] .btn,
:root[data-theme="light"] .btn *,
:root[data-theme="light"] .btn-primary *,
:root[data-theme="light"] .bg-emerald-500,
:root[data-theme="light"] .bg-emerald-500 *,
:root[data-theme="light"] .bg-emerald-600,
:root[data-theme="light"] .bg-emerald-600 *[class*="text-white"],
:root[data-theme="light"] .bg-teal-600,
:root[data-theme="light"] .bg-teal-600 *,
:root[data-theme="light"] .bg-blue-500,
:root[data-theme="light"] .bg-blue-500 *,
:root[data-theme="light"] .bg-amber-500,
:root[data-theme="light"] .bg-amber-500 *,
:root[data-theme="light"] .bg-\[\#0077b5\],
:root[data-theme="light"] .bg-\[\#0077b5\] *,
:root[data-theme="light"] .from-emerald-500,
:root[data-theme="light"] .from-emerald-500 *,
:root[data-theme="light"] .bg-black,
:root[data-theme="light"] .bg-red-500 {
  color: #ffffff !important;
}

:root[data-theme="light"] .bg-emerald-600 .bg-black\/30,
:root[data-theme="light"] .bg-emerald-600 .bg-black\/30 * {
  color: #0f111a !important;
}

:root[data-theme="light"] .bg-white\/5,
:root[data-theme="light"] .bg-white\/10 {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

:root[data-theme="light"] .hover\:bg-white\/5:hover,
:root[data-theme="light"] .hover\:bg-white\/10:hover {
  background-color: rgba(0, 0, 0, 0.08) !important;
}

:root[data-theme="light"] .from-emerald-900\/40 {
  --tw-gradient-from: rgba(16, 185, 129, 0.15) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(20, 184, 166, 0.15)) !important;
}

:root[data-theme="light"] .to-teal-900\/40 {
  --tw-gradient-to: rgba(20, 184, 166, 0.15) !important;
}

/* Ensure CTA visibility in light mode */
:root[data-theme="light"] .btn-secondary,
:root[data-theme="light"] .btn-secondary * {
  color: #0f111a !important;
  border-color: rgba(15, 23, 42, 0.25) !important;
}

:root[data-theme="light"] .btn-secondary {
  background: rgba(255, 255, 255, 0.9) !important;
}

:root[data-theme="light"] .btn-secondary:hover {
  background: rgba(241, 245, 249, 1) !important;
}

:root[data-theme="light"] .btn.bg-white,
:root[data-theme="light"] .btn.bg-white *,
:root[data-theme="light"] a.btn.bg-white,
:root[data-theme="light"] a.btn.bg-white * {
  color: #0f111a !important;
}

#theme-toggle {
  z-index: 120 !important;
}

:root[data-theme="light"] #theme-toggle {
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
}

:root[data-theme="light"] body[data-path="/"] .inline-flex.items-center.gap-2.px-3.py-1.rounded-full.border.border-cyan-500\/40.bg-cyan-500\/10.text-cyan-300.text-sm.font-medium.mb-6 {
  color: #2563eb !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
  background: rgba(37, 99, 235, 0.08) !important;
}

:root[data-theme="light"] body[data-path="/dashboard/chat"] {
  background: #eef2f7 !important;
  color: #0f172a !important;
}

:root[data-theme="light"] body[data-path="/dashboard/chat"] .glass,
:root[data-theme="light"] body[data-path="/dashboard/chat"] .glass-panel {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06) !important;
}

:root[data-theme="light"] body[data-path="/dashboard/chat"] .bg-\[\#0f111a\]\/80,
:root[data-theme="light"] body[data-path="/dashboard/chat"] .bg-\[\#0f111a\]\/90,
:root[data-theme="light"] body[data-path="/dashboard/chat"] .bg-black\/40,
:root[data-theme="light"] body[data-path="/dashboard/chat"] .bg-black\/30 {
  background-color: rgba(255, 255, 255, 0.92) !important;
}

:root[data-theme="light"] body[data-path="/dashboard/chat"] textarea {
  color: #0f172a !important;
}
