:root {
  --font-size: 16px;
  --background: #ffffff;
  --foreground: oklch(0.145 0 0);
  --card: #ffffff;
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: #030213;
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.95 0.0058 264.53);
  --secondary-foreground: #030213;
  --muted: #ececf0;
  --muted-foreground: #717182;
  --accent: #e9ebef;
  --accent-foreground: #030213;
  --destructive: #d4183d;
  --destructive-foreground: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
  --input: transparent;
  --input-background: #f3f3f5;
  --switch-background: #cbced4;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --ring: oklch(0.708 0 0);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --radius: 0.625rem;
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: #030213;
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.145 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.269 0 0);
  --input: oklch(0.269 0 0);
  --ring: oklch(0.439 0 0);
  --font-weight-medium: 50;
  --font-weight-normal: 400;
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.269 0 0);
  --sidebar-ring: oklch(0.439 0 0);
}

.gradient {
  --background: linear-gradient(135deg, #030213 0%, #121030 50%, #1a1740 100%);
  --foreground: #ffffff;
  --card: rgba(255, 255, 255, 0.05);
  --card-foreground: #ffffff;
  --popover: rgba(10, 9, 32, 0.95);
  --popover-foreground: #ffffff;
  --primary: #7c3aed;
  --primary-foreground: #ffffff;
  --secondary: rgba(124, 58, 237, 0.1);
  --secondary-foreground: #ffffff;
  --muted: rgba(255, 255, 255, 0.05);
  --muted-foreground: #a5b4fc;
  --accent: rgba(59, 130, 246, 0.1);
  --accent-foreground: #ffffff;
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;
  --border: rgba(124, 58, 237, 0.2);
  --input: rgba(124, 58, 237, 0.1);
  --ring: #7c3aed;
  --font-weight-medium: 50;
  --font-weight-normal: 400;
  --chart-1: #7c3aed;
  --chart-2: #3b82f6;
  --chart-3: #ec4899;
  --chart-4: #8b5cf6;
  --chart-5: #06b6d4;
  --sidebar: rgba(10, 9, 32, 0.95);
  --sidebar-foreground: #ffffff;
  --sidebar-primary: #7c3aed;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: rgba(124, 58, 237, 0.1);
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: rgba(124, 58, 237, 0.2);
  --sidebar-ring: #7c3aed;
}

/* Special background for gradient theme */
html.gradient body {
  background: var(--background);
  background-attachment: fixed;
  background-size: cover;
}

html.gradient .bg-white {
  background: rgba(255, 255, 255, 0.05);
}

html.gradient .bg-dark-950 {
  background: rgba(3, 2, 19, 0.7);
}

html.gradient .bg-dark-900 {
  background: rgba(10, 9, 32, 0.7);
}

html.gradient .bg-dark-800 {
  background: rgba(18, 16, 48, 0.7);
}

html.gradient .bg-gray-50 {
  background: rgba(255, 255, 255, 0.03);
}

html.gradient .bg-gray-100 {
  background: rgba(124, 58, 237, 0.1);
}

html.gradient .border-gray-200,
html.gradient .border-white\/10 {
  border-color: rgba(124, 58, 237, 0.2);
}

.custom {
  --background: linear-gradient(135deg, #1a1740 0%, #0a0920 50%, #030213 100%);
  --foreground: #ffffff;
  --card: rgba(255, 255, 255, 0.05);
  --card-foreground: #ffffff;
  --popover: rgba(10, 9, 32, 0.95);
  --popover-foreground: #ffffff;
  --primary: #22c55e;
  --primary-foreground: #ffffff;
  --secondary: rgba(34, 197, 94, 0.1);
  --secondary-foreground: #ffffff;
  --muted: rgba(255, 255, 255, 0.05);
  --muted-foreground: #86efac;
  --accent: rgba(59, 130, 246, 0.1);
  --accent-foreground: #ffffff;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: rgba(34, 197, 94, 0.2);
  --input: rgba(34, 197, 94, 0.1);
  --ring: #22c55e;
  --font-weight-medium: 50;
  --font-weight-normal: 400;
  --chart-1: #22c55e;
  --chart-2: #3b82f6;
  --chart-3: #ec4899;
  --chart-4: #8b5cf6;
  --chart-5: #06b6d4;
  --sidebar: rgba(10, 9, 32, 0.95);
  --sidebar-foreground: #ffffff;
  --sidebar-primary: #22c55e;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: rgba(34, 197, 94, 0.1);
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: rgba(34, 197, 94, 0.2);
  --sidebar-ring: #22c55e;
}

html.custom body {
  background: var(--background);
  background-attachment: fixed;
  background-size: cover;
}

html.custom .bg-white {
  background: rgba(255, 255, 255, 0.05);
}

html.custom .bg-dark-950 {
  background: rgba(3, 2, 19, 0.7);
}

html.custom .bg-dark-900 {
  background: rgba(10, 9, 32, 0.7);
}

html.custom .bg-dark-800 {
  background: rgba(26, 23, 64, 0.7);
}

html.custom .bg-gray-50 {
  background: rgba(255, 255, 255, 0.03);
}

html.custom .bg-gray-100 {
  background: rgba(34, 197, 94, 0.1);
}

html.custom .border-gray-200,
html.custom .border-white\/10 {
  border-color: rgba(34, 197, 94, 0.2);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }

  body {
    @apply bg-background text-foreground;
  }
}

html {
  font-size: var(--font-size);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.5;
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  font-weight: var(--font-weight-medium);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.9;
}

.input-field {
  background: var(--input-background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  color: var(--foreground);
}

.input-field:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--ring);
}

.log-info { border-left: 4px solid #3b82f6; }
.log-warning { border-left: 4px solid #f59e0b; }
.log-error { border-left: 4px solid #ef4444; }
.log-critical { border-left: 4px solid #dc2626; background: rgba(239, 68, 68, 0.05); }
.log-debug { border-left: 4px solid #6b7280; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeIn 0.5s ease-out; }
.animate-slide-up { animation: slideUp 0.5s ease-out; }
