/* ===== Modern Color Palette ===== */
:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-bg: #eef2ff;
    --primary-rgb: 99, 102, 241;

    /* Secondary Colors */
    --secondary: #10b981;
    --secondary-light: #34d399;
    --secondary-dark: #059669;

    /* Accent Colors */
    --accent: #f59e0b;
    --warning: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --success-rgb: 16, 185, 129;
    --info: #3b82f6;
    --info-rgb: 59, 130, 246;

    /* Neutral Colors */
    --white: #ffffff;
    --on-primary: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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);

    /* Semantic Color Tints */
    --green-50: #f0fdf4;
    --blue-50: #eff6ff;
    --yellow-50: #fefce8;
    --red-50: #fef2f2;
    --purple-50: #faf5ff;

    /* Primary extras */
    --primary-border: #c7d2fe;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.625rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* State Colors */
    --success-bg: #d1fae5;
    --success-border: #86efac;
    --success-text: #065f46;
    --danger-bg: #fee2e2;
    --danger-border: #fecaca;
    --danger-text: #991b1b;
    --danger-hover: #dc2626;
    --info-bg: #e3f2fd;
    --info-border: #1976d2;
    --info-text: #1976d2;
    --error-bg: #fef2f2;

    /* Semantic backgrounds */
    --hint-bg: rgba(245, 158, 11, 0.06);
    --explain-bg: rgba(59, 130, 246, 0.06);

    /* Semantic text aliases */
    --text-dark: var(--gray-900);
    --text-light: var(--gray-500);
    --success-light: #d1fae5;

    /* Overlay */
    --modal-overlay: rgba(0, 0, 0, 0.5);

    /* Transitions */
    --transition: all 0.2s ease;
    --transition-fast: all 0.15s ease;
}

/* ===== Dark Theme ===== */
[data-theme="dark"] {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-bg: #1e1b4b;
    --primary-rgb: 99, 102, 241;

    /* Secondary Colors */
    --secondary: #34d399;
    --secondary-light: #6ee7b7;
    --secondary-dark: #10b981;

    /* Accent Colors */
    --accent: #fbbf24;
    --warning: #fbbf24;
    --danger: #f87171;
    --success: #34d399;
    --success-rgb: 52, 211, 153;
    --info: #60a5fa;
    --info-rgb: 96, 165, 250;

    /* Neutral Colors (inverted) */
    --white: #1a1b2e;
    --on-primary: #ffffff;
    --gray-50: #1e2035;
    --gray-100: #252740;
    --gray-200: #2e3150;
    --gray-300: #3d4060;
    --gray-400: #6b7094;
    --gray-500: #9196b0;
    --gray-600: #b0b5cc;
    --gray-700: #cdd1e0;
    --gray-800: #e2e5f0;
    --gray-900: #f1f2f6;

    /* Semantic Color Tints (dark) */
    --green-50: rgba(52, 211, 153, 0.1);
    --blue-50: rgba(96, 165, 250, 0.1);
    --yellow-50: rgba(251, 191, 36, 0.1);
    --red-50: rgba(248, 113, 113, 0.1);
    --purple-50: rgba(167, 139, 250, 0.1);
    --primary-border: #3730a3;

    /* State Colors */
    --success-bg: rgba(52, 211, 153, 0.15);
    --success-border: #065f46;
    --success-text: #6ee7b7;
    --danger-bg: rgba(248, 113, 113, 0.15);
    --danger-border: #991b1b;
    --danger-text: #fca5a5;
    --danger-hover: #ef4444;
    --info-bg: rgba(96, 165, 250, 0.15);
    --info-border: #60a5fa;
    --info-text: #93c5fd;
    --error-bg: rgba(248, 113, 113, 0.1);

    /* Semantic backgrounds */
    --hint-bg: rgba(251, 191, 36, 0.08);
    --explain-bg: rgba(96, 165, 250, 0.08);

    /* Semantic text aliases */
    --text-dark: var(--gray-900);
    --text-light: var(--gray-500);
    --success-light: rgba(52, 211, 153, 0.15);

    /* Overlay */
    --modal-overlay: rgba(0, 0, 0, 0.7);

    /* Shadows (stronger for dark surfaces) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}
