/* Mindforge Main Styles */
:root {
  /* Colors */
  --color-primary: #667eea;
  --color-secondary: #764ba2;
  --color-accent: #ffd700;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-100: #f7fafc;
  --color-gray-200: #edf2f7;
  --color-gray-300: #e2e8f0;
  --color-gray-400: #cbd5e0;
  --color-gray-500: #a0aec0;
  --color-gray-600: #718096;
  --color-gray-700: #4a5568;
  --color-gray-800: #2d3748;
  --color-gray-900: #1a202c;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Typography */
  --font-primary: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* Z-index scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.6;
  background: #1f2937 !important; /* Dark gray-800 background */
  background-color: #1f2937 !important; /* Fallback */
}

body,
body.mindforge-frontpage,
html body,
body.wp-admin,
body.logged-in {
  font-family: var(--font-primary) !important;
  font-weight: var(--font-weight-normal);
  color: #e5e7eb !important; /* text-gray-200 for dark theme */
  background: #1f2937 !important; /* Dark gray-800 background */
  background-color: #1f2937 !important; /* Fallback */
  min-height: 100vh;
}

/* Typography - Dark Theme */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
  margin-bottom: var(--space-md);
  color: #e5e7eb; /* text-gray-200 for headings */
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  margin-bottom: var(--space-md);
  color: #9ca3af; /* text-gray-400 for paragraphs */
}

/* Neomorphic Base Styles */
.neumorphic-raised {
  background: #1f2937;
  border-radius: 1rem;
  box-shadow: 8px 8px 16px #111827, -8px -8px 16px #2d3a4a;
  transition: all 0.3s ease-in-out;
}

.neumorphic-raised:hover {
  box-shadow: 4px 4px 8px #111827, -4px -4px 8px #2d3a4a;
}

.neumorphic-pressed {
  background: #1f2937;
  border-radius: 1rem;
  box-shadow: inset 8px 8px 16px #111827, inset -8px -8px 16px #2d3a4a;
  transition: all 0.3s ease-in-out;
}

.neumorphic-active {
  box-shadow: inset 6px 6px 12px #111827, inset -6px -6px 12px #2d3a4a;
  color: #fb923c; /* Orange accent */
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  gap: var(--space-sm);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-secondary);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover:not(:disabled) {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-ghost {
  background: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
}

/* Avatar */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--color-gray-300);
  color: var(--color-gray-700);
  font-weight: var(--font-weight-medium);
}

.avatar-sm {
  width: 2rem;
  height: 2rem;
  font-size: var(--font-size-xs);
}

.avatar-md {
  width: 2.5rem;
  height: 2.5rem;
  font-size: var(--font-size-sm);
}

.avatar-lg {
  width: 3rem;
  height: 3rem;
  font-size: var(--font-size-base);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark Theme Container Overrides */
#mindforge-container,
.mindforge-frontpage,
.mindforge-main,
#app-container,
.wp-site-blocks,
.wp-container {
  background: #1f2937 !important; /* Dark gray-800 background */
  background-color: #1f2937 !important; /* Fallback */
  color: #e5e7eb !important; /* text-gray-200 */
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }
}