:root {
  /* Primitive Color Tokens */
  --color-white: rgba(255, 255, 255, 1);
  --color-black: rgba(0, 0, 0, 1);
  --color-cream-50: rgba(252, 252, 249, 1);
  --color-cream-100: rgba(255, 255, 253, 1);
  --color-gray-200: rgba(245, 245, 245, 1);
  --color-gray-300: rgba(167, 169, 169, 1);
  --color-gray-400: rgba(119, 124, 124, 1);
  --color-slate-500: rgba(98, 108, 113, 1);
  --color-brown-600: rgba(94, 82, 64, 1);
  --color-charcoal-700: rgba(31, 33, 33, 1);
  --color-charcoal-800: rgba(38, 40, 40, 1);
  --color-slate-900: rgba(19, 52, 59, 1);
  --color-teal-300: rgba(50, 184, 198, 1);
  --color-teal-400: rgba(45, 166, 178, 1);
  --color-teal-500: rgba(33, 128, 141, 1);
  --color-teal-600: rgba(29, 116, 128, 1);
  --color-teal-700: rgba(26, 104, 115, 1);
  --color-teal-800: rgba(41, 150, 161, 1);
  --color-red-400: rgba(255, 84, 89, 1);
  --color-red-500: rgba(192, 21, 47, 1);
  --color-orange-400: rgba(230, 129, 97, 1);
  --color-orange-500: rgba(168, 75, 47, 1);

  /* RGB versions for opacity control */
  --color-brown-600-rgb: 94, 82, 64;
  --color-teal-500-rgb: 33, 128, 141;
  --color-slate-900-rgb: 19, 52, 59;
  --color-slate-500-rgb: 98, 108, 113;
  --color-red-500-rgb: 192, 21, 47;
  --color-red-400-rgb: 255, 84, 89;
  --color-orange-500-rgb: 168, 75, 47;
  --color-orange-400-rgb: 230, 129, 97;

  /* Background color tokens (Light Mode) */
  --color-bg-1: rgba(59, 130, 246, 0.08); /* Light blue */
  --color-bg-2: rgba(245, 158, 11, 0.08); /* Light yellow */
  --color-bg-3: rgba(34, 197, 94, 0.08); /* Light green */
  --color-bg-4: rgba(239, 68, 68, 0.08); /* Light red */
  --color-bg-5: rgba(147, 51, 234, 0.08); /* Light purple */
  --color-bg-6: rgba(249, 115, 22, 0.08); /* Light orange */
  --color-bg-7: rgba(236, 72, 153, 0.08); /* Light pink */
  --color-bg-8: rgba(6, 182, 212, 0.08); /* Light cyan */

  /* Semantic Color Tokens (Light Mode) */
  --color-background: var(--color-cream-50);
  --color-surface: var(--color-cream-100);
  --color-text: var(--color-slate-900);
  --color-text-secondary: var(--color-slate-500);
  --color-primary: var(--color-teal-500);
  --color-primary-hover: var(--color-teal-600);
  --color-primary-active: var(--color-teal-700);
  --color-secondary: rgba(var(--color-brown-600-rgb), 0.12);
  --color-secondary-hover: rgba(var(--color-brown-600-rgb), 0.2);
  --color-secondary-active: rgba(var(--color-brown-600-rgb), 0.25);
  --color-border: rgba(var(--color-brown-600-rgb), 0.2);
  --color-btn-primary-text: var(--color-cream-50);
  --color-card-border: rgba(var(--color-brown-600-rgb), 0.12);
  --color-card-border-inner: rgba(var(--color-brown-600-rgb), 0.12);
  --color-error: var(--color-red-500);
  --color-success: var(--color-teal-500);
  --color-warning: var(--color-orange-500);
  --color-info: var(--color-slate-500);
  --color-focus-ring: rgba(var(--color-teal-500-rgb), 0.4);
  --color-select-caret: rgba(var(--color-slate-900-rgb), 0.8);

  /* Common style patterns */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

  /* RGB versions for opacity control */
  --color-success-rgb: 33, 128, 141;
  --color-error-rgb: 192, 21, 47;
  --color-warning-rgb: 168, 75, 47;
  --color-info-rgb: 98, 108, 113;

  /* Typography */
  --font-family-base: "FKGroteskNeue", "Geist", "Inter", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, monospace;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 550;
  --font-weight-bold: 600;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.01em;

  /* Spacing */
  --space-0: 0;
  --space-1: 1px;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-base: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
    0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04),
    0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
  :root {
    /* RGB versions for opacity control (Dark Mode) */
    --color-gray-400-rgb: 119, 124, 124;
    --color-teal-300-rgb: 50, 184, 198;
    --color-gray-300-rgb: 167, 169, 169;
    --color-gray-200-rgb: 245, 245, 245;

    /* Background color tokens (Dark Mode) */
    --color-bg-1: rgba(29, 78, 216, 0.15); /* Dark blue */
    --color-bg-2: rgba(180, 83, 9, 0.15); /* Dark yellow */
    --color-bg-3: rgba(21, 128, 61, 0.15); /* Dark green */
    --color-bg-4: rgba(185, 28, 28, 0.15); /* Dark red */
    --color-bg-5: rgba(107, 33, 168, 0.15); /* Dark purple */
    --color-bg-6: rgba(194, 65, 12, 0.15); /* Dark orange */
    --color-bg-7: rgba(190, 24, 93, 0.15); /* Dark pink */
    --color-bg-8: rgba(8, 145, 178, 0.15); /* Dark cyan */
    
    /* Semantic Color Tokens (Dark Mode) */
    --color-background: var(--color-charcoal-700);
    --color-surface: var(--color-charcoal-800);
    --color-text: var(--color-gray-200);
    --color-text-secondary: rgba(var(--color-gray-300-rgb), 0.7);
    --color-primary: var(--color-teal-300);
    --color-primary-hover: var(--color-teal-400);
    --color-primary-active: var(--color-teal-800);
    --color-secondary: rgba(var(--color-gray-400-rgb), 0.15);
    --color-secondary-hover: rgba(var(--color-gray-400-rgb), 0.25);
    --color-secondary-active: rgba(var(--color-gray-400-rgb), 0.3);
    --color-border: rgba(var(--color-gray-400-rgb), 0.3);
    --color-error: var(--color-red-400);
    --color-success: var(--color-teal-300);
    --color-warning: var(--color-orange-400);
    --color-info: var(--color-gray-300);
    --color-focus-ring: rgba(var(--color-teal-300-rgb), 0.4);
    --color-btn-primary-text: var(--color-slate-900);
    --color-card-border: rgba(var(--color-gray-400-rgb), 0.2);
    --color-card-border-inner: rgba(var(--color-gray-400-rgb), 0.15);
    --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    --button-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
    --color-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
    --color-select-caret: rgba(var(--color-gray-200-rgb), 0.8);

    /* Common style patterns - updated for dark mode */
    --focus-ring: 0 0 0 3px var(--color-focus-ring);
    --focus-outline: 2px solid var(--color-primary);
    --status-bg-opacity: 0.15;
    --status-border-opacity: 0.25;
    --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    /* RGB versions for dark mode */
    --color-success-rgb: var(--color-teal-300-rgb);
    --color-error-rgb: var(--color-red-400-rgb);
    --color-warning-rgb: var(--color-orange-400-rgb);
    --color-info-rgb: var(--color-gray-300-rgb);
  }
}

/* Data attribute for manual theme switching */
[data-color-scheme="dark"] {
  /* RGB versions for opacity control (dark mode) */
  --color-gray-400-rgb: 119, 124, 124;
  --color-teal-300-rgb: 50, 184, 198;
  --color-gray-300-rgb: 167, 169, 169;
  --color-gray-200-rgb: 245, 245, 245;

  /* Colorful background palette - Dark Mode */
  --color-bg-1: rgba(29, 78, 216, 0.15); /* Dark blue */
  --color-bg-2: rgba(180, 83, 9, 0.15); /* Dark yellow */
  --color-bg-3: rgba(21, 128, 61, 0.15); /* Dark green */
  --color-bg-4: rgba(185, 28, 28, 0.15); /* Dark red */
  --color-bg-5: rgba(107, 33, 168, 0.15); /* Dark purple */
  --color-bg-6: rgba(194, 65, 12, 0.15); /* Dark orange */
  --color-bg-7: rgba(190, 24, 93, 0.15); /* Dark pink */
  --color-bg-8: rgba(8, 145, 178, 0.15); /* Dark cyan */
  
  /* Semantic Color Tokens (Dark Mode) */
  --color-background: var(--color-charcoal-700);
  --color-surface: var(--color-charcoal-800);
  --color-text: var(--color-gray-200);
  --color-text-secondary: rgba(var(--color-gray-300-rgb), 0.7);
  --color-primary: var(--color-teal-300);
  --color-primary-hover: var(--color-teal-400);
  --color-primary-active: var(--color-teal-800);
  --color-secondary: rgba(var(--color-gray-400-rgb), 0.15);
  --color-secondary-hover: rgba(var(--color-gray-400-rgb), 0.25);
  --color-secondary-active: rgba(var(--color-gray-400-rgb), 0.3);
  --color-border: rgba(var(--color-gray-400-rgb), 0.3);
  --color-error: var(--color-red-400);
  --color-success: var(--color-teal-300);
  --color-warning: var(--color-orange-400);
  --color-info: var(--color-gray-300);
  --color-focus-ring: rgba(var(--color-teal-300-rgb), 0.4);
  --color-btn-primary-text: var(--color-slate-900);
  --color-card-border: rgba(var(--color-gray-400-rgb), 0.2);
  --color-card-border-inner: rgba(var(--color-gray-400-rgb), 0.15);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  --button-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
  --color-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
  --color-select-caret: rgba(var(--color-gray-200-rgb), 0.8);

  /* Common style patterns - updated for dark mode */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

  /* RGB versions for dark mode */
  --color-success-rgb: var(--color-teal-300-rgb);
  --color-error-rgb: var(--color-red-400-rgb);
  --color-warning-rgb: var(--color-orange-400-rgb);
  --color-info-rgb: var(--color-gray-300-rgb);
}

[data-color-scheme="light"] {
  /* RGB versions for opacity control (light mode) */
  --color-brown-600-rgb: 94, 82, 64;
  --color-teal-500-rgb: 33, 128, 141;
  --color-slate-900-rgb: 19, 52, 59;
  
  /* Semantic Color Tokens (Light Mode) */
  --color-background: var(--color-cream-50);
  --color-surface: var(--color-cream-100);
  --color-text: var(--color-slate-900);
  --color-text-secondary: var(--color-slate-500);
  --color-primary: var(--color-teal-500);
  --color-primary-hover: var(--color-teal-600);
  --color-primary-active: var(--color-teal-700);
  --color-secondary: rgba(var(--color-brown-600-rgb), 0.12);
  --color-secondary-hover: rgba(var(--color-brown-600-rgb), 0.2);
  --color-secondary-active: rgba(var(--color-brown-600-rgb), 0.25);
  --color-border: rgba(var(--color-brown-600-rgb), 0.2);
  --color-btn-primary-text: var(--color-cream-50);
  --color-card-border: rgba(var(--color-brown-600-rgb), 0.12);
  --color-card-border-inner: rgba(var(--color-brown-600-rgb), 0.12);
  --color-error: var(--color-red-500);
  --color-success: var(--color-teal-500);
  --color-warning: var(--color-orange-500);
  --color-info: var(--color-slate-500);
  --color-focus-ring: rgba(var(--color-teal-500-rgb), 0.4);

  /* RGB versions for light mode */
  --color-success-rgb: var(--color-teal-500-rgb);
  --color-error-rgb: var(--color-red-500-rgb);
  --color-warning-rgb: var(--color-orange-500-rgb);
  --color-info-rgb: var(--color-slate-500-rgb);
}

/* Base styles */
html {
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-tight);
}

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-md);
}

p {
  margin: 0 0 var(--space-16) 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

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

code,
pre {
  font-family: var(--font-family-mono);
  font-size: calc(var(--font-size-base) * 0.95);
  background-color: var(--color-secondary);
  border-radius: var(--radius-sm);
}

code {
  padding: var(--space-1) var(--space-4);
}

pre {
  padding: var(--space-16);
  margin: var(--space-16) 0;
  overflow: auto;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-base);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

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

.btn--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
}

.btn--primary:active {
  background: var(--color-primary-active);
  transform: translateY(0);
}

.btn--secondary {
  background: var(--color-secondary);
  color: var(--color-text);
}

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

.btn--secondary:active {
  background: var(--color-secondary-active);
}

.btn--outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

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

.btn--sm {
  padding: var(--space-4) var(--space-12);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

.btn--lg {
  padding: var(--space-10) var(--space-20);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-md);
}

.btn--full-width {
  width: 100%;
}

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

/* Form elements */
.form-control {
  display: block;
  width: 100%;
  padding: var(--space-8) var(--space-12);
  font-size: var(--font-size-md);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  transition: border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

textarea.form-control {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
}

select.form-control {
  padding: var(--space-8) var(--space-12);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: var(--select-caret-light);
  background-repeat: no-repeat;
  background-position: right var(--space-12) center;
  background-size: 16px;
  padding-right: var(--space-32);
}

/* Add a dark mode specific caret */
@media (prefers-color-scheme: dark) {
  select.form-control {
    background-image: var(--select-caret-dark);
  }
}

/* Also handle data-color-scheme */
[data-color-scheme="dark"] select.form-control {
  background-image: var(--select-caret-dark);
}

[data-color-scheme="light"] select.form-control {
  background-image: var(--select-caret-light);
}

.form-control:focus {
  border-color: var(--color-primary);
  outline: var(--focus-outline);
}

.form-label {
  display: block;
  margin-bottom: var(--space-8);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.form-group {
  margin-bottom: var(--space-16);
}

/* Card component */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--duration-normal) var(--ease-standard);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card__body {
  padding: var(--space-16);
}

.card__header,
.card__footer {
  padding: var(--space-16);
  border-bottom: 1px solid var(--color-card-border-inner);
}

/* Status indicators - simplified with CSS variables */
.status {
  display: inline-flex;
  align-items: center;
  padding: var(--space-6) var(--space-12);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.status--success {
  background-color: rgba(
    var(--color-success-rgb, 33, 128, 141),
    var(--status-bg-opacity)
  );
  color: var(--color-success);
  border: 1px solid
    rgba(var(--color-success-rgb, 33, 128, 141), var(--status-border-opacity));
}

.status--error {
  background-color: rgba(
    var(--color-error-rgb, 192, 21, 47),
    var(--status-bg-opacity)
  );
  color: var(--color-error);
  border: 1px solid
    rgba(var(--color-error-rgb, 192, 21, 47), var(--status-border-opacity));
}

.status--warning {
  background-color: rgba(
    var(--color-warning-rgb, 168, 75, 47),
    var(--status-bg-opacity)
  );
  color: var(--color-warning);
  border: 1px solid
    rgba(var(--color-warning-rgb, 168, 75, 47), var(--status-border-opacity));
}

.status--info {
  background-color: rgba(
    var(--color-info-rgb, 98, 108, 113),
    var(--status-bg-opacity)
  );
  color: var(--color-info);
  border: 1px solid
    rgba(var(--color-info-rgb, 98, 108, 113), var(--status-border-opacity));
}

/* Container layout */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--space-16);
  padding-left: var(--space-16);
}

@media (min-width: 640px) {
  .container {
    max-width: var(--container-sm);
  }
}
@media (min-width: 768px) {
  .container {
    max-width: var(--container-md);
  }
}
@media (min-width: 1024px) {
  .container {
    max-width: var(--container-lg);
  }
}
@media (min-width: 1280px) {
  .container {
    max-width: var(--container-xl);
  }
}

/* Utility classes */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-4 {
  gap: var(--space-4);
}
.gap-8 {
  gap: var(--space-8);
}
.gap-16 {
  gap: var(--space-16);
}

.m-0 {
  margin: 0;
}
.mt-8 {
  margin-top: var(--space-8);
}
.mb-8 {
  margin-bottom: var(--space-8);
}
.mx-8 {
  margin-left: var(--space-8);
  margin-right: var(--space-8);
}
.my-8 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}

.p-0 {
  padding: 0;
}
.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}
.px-8 {
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}
.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}
.px-16 {
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}

.block {
  display: block;
}
.hidden {
  display: none;
}

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

:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Dark mode specifics */
[data-color-scheme="dark"] .btn--outline {
  border: 1px solid var(--color-border-secondary);
}

@font-face {
  font-family: 'FKGroteskNeue';
  src: url('https://r2cdn.perplexity.ai/fonts/FKGroteskNeue.woff2')
    format('woff2');
}

/* END PERPLEXITY DESIGN SYSTEM */
/* Import AOS Animation Library */
@import url('https://unpkg.com/aos@2.3.1/dist/aos.css');

/* Enhanced CivicSoul Brand Colors */
:root {
  /* Primary Brand Colors */
  --civic-primary: #002244;
  --civic-accent-blue: #2962FF;
  --civic-accent-teal: #00B8D4;
  --civic-light-bg: #f8f9fa;
  --civic-light-text: #002244;
  --civic-text-light: #f8f9fa;
  --civic-gradient-1: linear-gradient(135deg, var(--civic-accent-teal), var(--civic-accent-blue));
  --civic-gradient-2: linear-gradient(45deg, var(--civic-primary), var(--civic-accent-teal));
  --civic-gradient-3: linear-gradient(180deg, rgba(0,184,212,0.1), rgba(41,98,255,0.1));
  
  /* Override design system colors */
  --color-primary: var(--civic-accent-teal);
  --color-primary-hover: #00acc1;
  --color-primary-active: #0097a7;
  --color-text: var(--civic-primary);
  --color-background: var(--civic-light-bg);
  --color-surface: #ffffff;
  
  /* Animation Variables */
  --animation-duration: 0.3s;
  --animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
  --pulse-animation: pulse 2s infinite;
}

/* FIXED: Dark Theme Variables - Complete Implementation */
[data-theme="dark"] {
  --color-background: var(--civic-primary);
  --color-surface: #1a1a2e;
  --color-text: var(--civic-text-light);
  --color-text-secondary: rgba(248, 249, 250, 0.7);
  --color-border: rgba(248, 249, 250, 0.2);
  --color-card-border: rgba(248, 249, 250, 0.1);
  --color-card-border-inner: rgba(248, 249, 250, 0.1);
  --civic-gradient-3: linear-gradient(180deg, rgba(0,184,212,0.2), rgba(41,98,255,0.2));
}

/* Base Styles with Enhanced Animations */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  transition: all var(--animation-duration) var(--animation-easing);
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* Floating Background Elements */
.floating-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.floating-element {
  position: absolute;
  border-radius: 50%;
  opacity: 0.05;
  animation: float-around 20s infinite linear;
}

.floating-element-1 {
  width: 80px;
  height: 80px;
  background: var(--civic-accent-blue);
  top: 10%;
  left: 10%;
  animation-duration: 25s;
}

.floating-element-2 {
  width: 60px;
  height: 60px;
  background: var(--civic-accent-teal);
  top: 70%;
  right: 15%;
  animation-duration: 30s;
  animation-direction: reverse;
}

.floating-element-3 {
  width: 100px;
  height: 100px;
  background: var(--civic-primary);
  top: 30%;
  right: 20%;
  animation-duration: 35s;
}

.floating-element-4 {
  width: 40px;
  height: 40px;
  background: var(--civic-accent-blue);
  bottom: 20%;
  left: 20%;
  animation-duration: 20s;
  animation-direction: reverse;
}

.floating-element-5 {
  width: 120px;
  height: 120px;
  background: var(--civic-accent-teal);
  top: 50%;
  left: 50%;
  animation-duration: 40s;
}

@keyframes float-around {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(20px, -30px) rotate(90deg); }
  50% { transform: translate(-20px, 20px) rotate(180deg); }
  75% { transform: translate(30px, 10px) rotate(270deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

/* FIXED: Theme Toggle - LEFT BOTTOM CORNER with Glass Effect */
.theme-toggle-floating {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 1002;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--animation-duration) var(--animation-easing);
  
  /* Glass effect - light mode */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Dark mode glass effect */
[data-theme="dark"] .theme-toggle-floating {
  background: rgba(26, 26, 46, 0.15);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.theme-toggle-floating:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(0, 184, 212, 0.3);
}

.toggle-inner {
  position: relative;
  width: 24px;
  height: 24px;
  color: var(--color-text);
}

.theme-toggle-floating .moon-icon {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
}

.theme-toggle-floating .sun-icon {
  position: absolute;
  top: 0;
  left: 0;
}

[data-theme="dark"] .theme-toggle-floating .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle-floating .moon-icon {
  display: block;
}

/* FIXED: Enhanced Navigation with COMPLETE Dark Mode Support */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  transition: all var(--animation-duration) var(--animation-easing);
  
  /* Light mode - glass effect */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* FIXED: Complete Dark Mode Implementation for Navbar */
[data-theme="dark"] .navbar {
  background: rgba(0, 34, 68, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Additional dark mode styling for navbar elements */
[data-theme="dark"] .nav-link {
  color: var(--civic-text-light) !important;
}

[data-theme="dark"] .nav-link:hover {
  color: var(--civic-accent-teal) !important;
}

[data-theme="dark"] .hamburger span {
  background: var(--civic-text-light) !important;
}

[data-theme="dark"] .nav-brand h2 {
  color: var(--civic-accent-teal) !important;
}

[data-theme="dark"] .brand-icon {
  color: var(--civic-accent-teal) !important;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

/* Brand Logo with City Icon */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--animation-duration) var(--animation-easing);
}

.nav-brand:hover {
  transform: scale(1.05);
}

.brand-icon {
  font-size: 1.8rem;
  color: var(--civic-accent-teal);
  animation: pulse-glow 2s infinite;
}

.nav-brand h2 {
  color: var(--civic-accent-teal);
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--civic-gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--animation-duration) var(--animation-easing);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: var(--civic-accent-teal);
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--civic-gradient-1);
  transition: width var(--animation-duration) var(--animation-easing);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  margin-left: 1rem;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  z-index: 1003;
  position: relative;
  padding: 8px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--color-text);
  transition: all var(--animation-duration) var(--animation-easing);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Enhanced Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--civic-gradient-3);
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: var(--civic-accent-teal);
  top: 20%;
  right: 10%;
  animation: float 6s ease-in-out infinite;
}

.shape-2 {
  width: 200px;
  height: 200px;
  background: var(--civic-accent-blue);
  bottom: 30%;
  left: 5%;
  animation: float 8s ease-in-out infinite reverse;
}

.shape-3 {
  width: 150px;
  height: 150px;
  background: var(--civic-primary);
  top: 50%;
  left: 50%;
  animation: float 10s ease-in-out infinite;
}

.shape-4 {
  width: 100px;
  height: 100px;
  background: var(--civic-accent-blue);
  top: 10%;
  left: 15%;
  animation: float 12s ease-in-out infinite;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

/* Enhanced Gradient Text Animation */
.gradient-text {
  background: var(--civic-gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.stat {
  text-align: center;
  transition: all var(--animation-duration) var(--animation-easing);
}

.stat:hover {
  transform: translateY(-5px);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--civic-accent-teal);
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
}

/* Enhanced Button Styles with Pulse Effect */
.pulse-glow {
  animation: var(--pulse-animation);
  box-shadow: 0 0 20px rgba(0, 184, 212, 0.3);
}

@keyframes pulse {
  0% { box-shadow: 0 0 20px rgba(0, 184, 212, 0.3); }
  50% { box-shadow: 0 0 30px rgba(0, 184, 212, 0.6), 0 0 40px rgba(41, 98, 255, 0.3); }
  100% { box-shadow: 0 0 20px rgba(0, 184, 212, 0.3); }
}

/* CTA Button Specific Styling */
.cta-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 184, 212, 0.5);
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.cta-button:hover::before {
  left: 100%;
}

/* Enhanced 3D Card Effects */
.card-3d {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
}

.card-3d:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Sections */
section {
  padding: 5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem auto;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.section-header p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
}

/* Features Section */
.features {
  background: var(--color-surface);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--color-background);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--civic-gradient-1);
  transform: scaleX(0);
  transition: transform var(--animation-duration) var(--animation-easing);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem auto;
  background: var(--civic-gradient-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  transition: all var(--animation-duration) var(--animation-easing);
}

.feature-card:hover .feature-icon {
  transform: rotate(360deg) scale(1.1);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.feature-card p {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Feature badge styles */
.feature-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  z-index: 2;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: background 0.2s, color 0.2s;
}
.badge-progress {
  background: #ffb300;
  color: #222;
}
.badge-soon {
  background: #e57373;
  color: #fff;
}
[data-theme="dark"] .feature-badge.badge-progress {
  background: #ffd54f;
  color: #222;
}
[data-theme="dark"] .feature-badge.badge-soon {
  background: #ef5350;
  color: #fff;
}

/* How It Works Section */
.how-it-works {
  background: var(--civic-gradient-3);
}

.steps-container {
  max-width: 900px;
  margin: 0 auto;
}

.step {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all var(--animation-duration) var(--animation-easing);
}

.step:hover {
  transform: translateX(10px);
  box-shadow: 0 15px 40px rgba(0, 184, 212, 0.2);
}

.step:nth-child(even) {
  grid-template-columns: 60px 1fr 60px;
}

.step:nth-child(even):hover {
  transform: translateX(-10px);
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--civic-gradient-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.step-content h3 {
  color: var(--civic-accent-teal);
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.step-content p {
  color: var(--color-text-secondary);
}

.step-icon {
  width: 50px;
  height: 50px;
  background: var(--color-bg-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--civic-accent-teal);
}

/* Impact Section */
.impact {
  background: var(--color-surface);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.impact-card {
  background: var(--color-background);
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.4s var(--animation-easing);
  border: 1px solid var(--color-card-border);
  position: relative;
  overflow: hidden;
}

.impact-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--civic-gradient-1);
  opacity: 0;
  transition: opacity var(--animation-duration) var(--animation-easing);
  z-index: 1;
}

.impact-card:hover::after {
  opacity: 0.05;
}

.impact-card:hover {
  transform: translateY(-10px) scale(1.02);
}

.impact-icon {
  font-size: 3rem;
  color: var(--civic-accent-teal);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.impact-card h3 {
  color: var(--color-text);
  margin-bottom: 1rem;
  font-size: 1.3rem;
  position: relative;
  z-index: 2;
}

.impact-card p {
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.impact-metric {
  background: var(--civic-gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
  font-size: 1.2rem;
  position: relative;
  z-index: 2;
}

/* About Section */
.about {
  background: var(--civic-gradient-3);
  padding: 6rem 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h3 {
  color: var(--civic-accent-teal);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.benefits-list {
  list-style: none;
  padding: 0;
}

.benefits-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.benefits-list i {
  color: var(--civic-accent-teal);
  width: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background: var(--color-surface);
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  transition: all var(--animation-duration) var(--animation-easing);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 184, 212, 0.15);
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--civic-accent-teal);
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--civic-accent-teal);
}

.stat-text {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* Contact Section */
.contact {
  background: var(--color-surface);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--color-background);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-card-border);
  transition: all var(--animation-duration) var(--animation-easing);
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--civic-gradient-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.contact-item h4 {
  color: var(--color-text);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.contact-item a {
  color: var(--civic-accent-teal);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--animation-duration) var(--animation-easing);
}

.contact-item a:hover {
  color: var(--civic-accent-blue);
}

.contact-item p {
  color: var(--color-text-secondary);
  margin: 0;
}

.contact-cta {
  padding: 2.5rem;
  background: var(--color-background);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  text-align: center;
}

.contact-cta h3 {
  color: var(--color-text);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.contact-cta p {
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

/* FIXED: Enhanced Team Section - Bottom-Right with Social Links */
/* ===== TEAM SECTION EMERGENCY FIX ===== */
/* Complete reset to original working state */

/* Reset team section to proper size and position */
.team-section-compact {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 320px !important;
    max-width: 320px !important;
    min-height: auto !important;
    max-height: 500px !important; /* Controlled height */
    background: rgba(0, 34, 68, 0.95) !important;
    border: 1px solid rgba(0, 184, 212, 0.3) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    z-index: 1000 !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}

/* Team toggle header - always visible */
.team-toggle {
    background: rgba(0, 184, 212, 0.1) !important;
    border-bottom: 1px solid rgba(0, 184, 212, 0.2) !important;
    padding: 16px !important;
    cursor: pointer !important;
    user-select: none !important;
    display: block !important;
    position: relative !important;
}

.team-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    color: #ffffff !important;
}

.team-header h4 {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #00B8D4 !important;
}

.team-header span {
    font-size: 0.8rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
    margin: 0 !important;
}

/* Arrow styling */
.team-arrow {
    color: #00B8D4 !important;
    transition: transform 0.3s ease !important;
    transform: rotate(0deg) !important;
    font-size: 16px !important;
}

/* Team content - collapsible */
.team-content {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.4s ease, opacity 0.3s ease !important;
    opacity: 0 !important;
    background: transparent !important;
}

.team-content.expanded {
    max-height: 400px !important; /* Enough for 4 members */
    opacity: 1 !important;
}

/* Team members title */
.team-members-title {
    padding: 12px 16px 8px 16px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 0 !important;
}

/* Team grid */
.team-grid-compact {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 12px !important;
    margin: 0 !important;
}

/* Team member cards */
.team-member-compact {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.3s ease !important;
    min-height: 60px !important;
    max-height: 60px !important;
}

.team-member-compact:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(0, 184, 212, 0.3) !important;
}

/* Member info */
.member-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.member-name {
    font-weight: 600 !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

.member-role {
    font-size: 0.8rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

/* Social links */
.member-social {
    display: flex !important;
    gap: 8px !important;
}

.social-link {
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 184, 212, 0.2) !important;
    border: 1px solid rgba(0, 184, 212, 0.3) !important;
    border-radius: 6px !important;
    color: #00B8D4 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
}

.social-link:hover {
    background: rgba(0, 184, 212, 0.3) !important;
    border-color: #00B8D4 !important;
    transform: translateY(-2px) !important;
}

/* MOBILE-FIRST RESPONSIVE DESIGN - COMPLETELY FIXED */
@media (max-width: 768px) {
  /* Theme Toggle - Responsive Position */
  .theme-toggle-floating {
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
  }
  
  .toggle-inner {
    width: 20px;
    height: 20px;
  }
  
  /* FIXED: Mobile Navigation with Complete Dark Mode Support */
  .hamburger {
    display: flex;
  }
  
  .nav-container {
    padding: 0 1rem;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--color-surface);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    transition: left var(--animation-duration) var(--animation-easing);
    border-top: 1px solid var(--color-border);
    backdrop-filter: blur(20px);
    z-index: 998;
  }
  
  /* FIXED: Dark mode mobile menu */
  [data-theme="dark"] .nav-menu {
    background: rgba(0, 34, 68, 0.98) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-link {
    padding: 1rem;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    font-size: 1.1rem;
  }
  
  .nav-link::after {
    display: none;
  }
  
  .nav-cta {
    margin: 1rem 0;
    width: 80%;
    max-width: 300px;
  }
  
  /* Hero Section - Mobile Responsive */
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.1;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .hero-actions .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  /* Sections - Mobile Responsive */
  section {
    padding: 3rem 0;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  /* Steps - Mobile Layout */
  .step {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
  }
  
  .step-number {
    margin: 0 auto;
  }
  
  .step-icon {
    margin: 0 auto;
  }
  
  /* About Section - Mobile */
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  /* Impact Grid - Mobile */
  .impact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Contact Section - Mobile */
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Team Section - Mobile Responsive */
  .team-section-compact {
    bottom: 20px;
    right: 20px;
    left: 20px;
    max-width: none;
  }
  
  .team-content.active {
    max-height: 350px;
  }
  
  .team-member-compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .member-social {
    align-self: flex-end;
  }
  
  /* Footer - Mobile Responsive */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
  
  .container {
    padding: 0 1rem;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
  }
  
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  .section-header h2 {
    font-size: 1.8rem;
  }
  
  .theme-toggle-floating {
    width: 45px;
    height: 45px;
    bottom: 15px;
    left: 15px;
  }
  
  .team-section-compact {
    bottom: 15px;
    right: 15px;
    left: 15px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-container {
    padding: 0 0.5rem;
  }
}

/* Large Desktop */
@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-content {
    grid-template-columns: 2.5fr 1fr 1fr 2fr;
  }
}

/* Focus Styles for Accessibility */
:focus-visible {
  outline: 2px solid var(--civic-accent-teal);
  outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .floating-element {
    animation: none !important;
  }
}

/* Print Styles */
@media print {
  .theme-toggle-floating,
  .team-section-compact,
  .floating-elements {
    display: none !important;
  }
}

/* Footer Styles for CivicSoul */
.footer {
  background: #0e2239;
  color: #fff;
  padding: 48px 0 20px 0;
  width: 100%;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
  justify-content: flex-start;
}

.footer-section {
  flex: 1 1 200px;
  min-width: 180px;
  margin-bottom: 24px;
}

.footer-brand {
  flex: 2 1 320px;
  min-width: 260px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.footer-logo img {
  height: 36px;
  width: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.footer-logo h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.footer-brand p {
  margin: 0 0 14px 0;
  color: #b0b8c9;
  font-size: 1.05rem;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #18314f;
  color: #6ec1e4;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1.15rem;
  transition: background 0.2s, color 0.2s;
}

.footer-social a:hover {
  background: #6ec1e4;
  color: #18314f;
}

.footer-section h4 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 7px;
}

.footer-links a {
  color: #6ec1e4;
  text-decoration: none;
  transition: color 0.2s;
  font-size: 1rem;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-contact {
  margin-top: 0;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #6ec1e4;
  font-size: 1rem;
}

.contact-info-item i {
  color: #6ec1e4;
  font-size: 1.1rem;
}

.contact-info-item a {
  color: #6ec1e4;
  text-decoration: none;
  transition: color 0.2s;
  word-break: break-all;
}

.contact-info-item a:hover {
  color: #fff;
}

.footer-bottom {
  width: 100%;
  text-align: left;
  margin-top: 32px;
  font-size: 0.97rem;
  color: #b0b8c9;
  border-top: 1px solid #18314f;
  padding-top: 14px;
}

.footer-bottom-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-bottom-links {
  display: flex;
  gap: 16px;
}

.footer-bottom-links a {
  color: #b0b8c9;
  font-size: 0.97rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .footer-content {
    flex-direction: column;
    gap: 24px;
  }
  .footer-section,
  .footer-brand {
    min-width: 0;
    width: 100%;
  }
  .footer-bottom-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
/* Dark mode support */
[data-theme="dark"] .footer {
  background: #0a1627;
  color: #e0e6ef;
}

[data-theme="dark"] .footer h3,
[data-theme="dark"] .footer h4 {
  color: #e0e6ef;
}

[data-theme="dark"] .footer a {
  color: #6ec1e4;
}

[data-theme="dark"] .footer a:hover {
  color: #fff;
}

[data-theme="dark"] .footer-bottom,
[data-theme="dark"] .footer-bottom-links a {
  color: #7a869a;
  border-top: 1px solid #22304a;
}




