/* Sunwolf.dev - Modern Dark Theme with Cool Colors */
:root {
  /* Color Palette - Cool Dark Theme */
  --background: 0 0% 3.9%;
  --foreground: 0 0% 98%;
  
  --muted: 0 0% 14.9%;
  --muted-foreground: 0 0% 63.9%;
  
  --popover: 0 0% 3.9%;
  --popover-foreground: 0 0% 98%;
  
  --card: 0 0% 3.9%;
  --card-foreground: 0 0% 98%;
  
  --border: 0 0% 14.9%;
  --input: 0 0% 14.9%;
  
  --primary: 217 91% 60%;
  --primary-foreground: 0 0% 98%;
  
  --secondary: 0 0% 14.9%;
  --secondary-foreground: 0 0% 98%;
  
  --accent: 0 0% 14.9%;
  --accent-foreground: 0 0% 98%;
  
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 98%;
  
  --ring: 217 91% 60%;
  
  /* Semantic Colors */
  --success: 142 76% 36%;
  --warning: 48 96% 53%;
  --info: 217 91% 60%;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, hsl(217, 91%, 60%) 0%, hsl(212, 100%, 47%) 100%);
  --gradient-secondary: linear-gradient(135deg, hsl(0, 0%, 14.9%) 0%, hsl(0, 0%, 20%) 100%);
  --gradient-subtle: linear-gradient(135deg, hsl(0, 0%, 6%) 0%, hsl(0, 0%, 10%) 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Border Radius */
  --radius: 0.5rem;
}

/* Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  font-variation-settings: normal;
}

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-feature-settings: "rlig" 1, "calt" 1;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
}

/* Utility Classes */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } }

/* Layout */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Sizing */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.m-4 { margin: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* Grid System */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (min-width: 768px) {
  .md\\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Flex Wrap */
.flex-wrap { flex-wrap: wrap; }

/* Text Utilities */
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }

/* Background Gradients */
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-blue-400 { --tw-gradient-from: #60a5fa; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(96, 165, 250, 0)); }
.to-blue-600 { --tw-gradient-to: #2563eb; }
.bg-clip-text { background-clip: text; -webkit-background-clip: text; }
.text-transparent { color: transparent; }

/* Hover Effects */
.hover\\:underline:hover { text-decoration: underline; }

/* Additional Margins */
.mb-2 { margin-bottom: 0.5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-6 { margin-top: 1.5rem; }

/* Positioning */
.mx-auto { margin-left: auto; margin-right: auto; }
.text-right { text-align: right; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Background with opacity */
.bg-primary\\/10 { background-color: hsl(var(--primary) / 0.1); }
.border-primary\\/20 { border-color: hsl(var(--primary) / 0.2); }

/* Typography */
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }
.text-left { text-align: left; }

/* Colors */
.text-primary { color: hsl(var(--primary)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.text-destructive { color: hsl(var(--destructive)); }
.text-success { color: hsl(var(--success)); }

.bg-background { background-color: hsl(var(--background)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-muted { background-color: hsl(var(--muted)); }
.bg-primary { background-color: hsl(var(--primary)); }
.bg-secondary { background-color: hsl(var(--secondary)); }
.bg-destructive { background-color: hsl(var(--destructive)); }

/* Components */
.card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.btn-primary {
  background: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: 1px solid hsl(var(--border));
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary) / 0.8);
}

.btn-ghost {
  background: transparent;
  color: hsl(var(--foreground));
}

.btn-ghost:hover {
  background-color: hsl(var(--accent));
}

.btn-sm { padding: 0.5rem 0.75rem; }
.btn-md { padding: 0.625rem 1rem; }
.btn-lg { padding: 0.75rem 1.5rem; }

.input {
  display: flex;
  height: 2.5rem;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: all 0.2s ease-in-out;
  color: hsl(var(--foreground));
}

.input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

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

.label {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
  display: block;
}

.alert {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.alert-success {
  border-color: hsl(var(--success) / 0.5);
  background-color: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
}

.alert-error {
  border-color: hsl(var(--destructive) / 0.5);
  background-color: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

.alert-info {
  border-color: hsl(var(--info) / 0.5);
  background-color: hsl(var(--info) / 0.1);
  color: hsl(var(--info));
}

/* Animation */
.loading {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid hsl(var(--muted));
  border-top: 2px solid hsl(var(--primary));
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Glass Effect */
.glass {
  backdrop-filter: blur(16px) saturate(180%);
  background-color: hsl(var(--background) / 0.8);
  border: 1px solid hsl(var(--border) / 0.3);
}

/* Hover Effects */
.hover-lift:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease-in-out;
}

.hover-glow:hover {
  box-shadow: 0 0 20px hsl(var(--primary) / 0.3);
  transition: box-shadow 0.3s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .text-4xl { font-size: 1.875rem; line-height: 2.25rem; }
  .text-3xl { font-size: 1.5rem; line-height: 2rem; }
  .p-8 { padding: 1.5rem; }
  .p-6 { padding: 1rem; }
}

/* Custom Components */
.nav-item {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  transition: all 0.2s ease-in-out;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-item:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.nav-item.active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.chat-bubble {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  max-width: 80%;
}

.chat-bubble.user {
  background: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
  margin-left: auto;
  border-bottom-right-radius: 0.25rem;
}

.chat-bubble.assistant {
  background-color: hsl(var(--muted));
  color: hsl(var(--foreground));
  border-bottom-left-radius: 0.25rem;
}

.status-indicator {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-online { background-color: hsl(var(--success)); }
.status-offline { background-color: hsl(var(--muted-foreground)); }
.status-error { background-color: hsl(var(--destructive)); }