/* style.css */

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    /* Variables map directly to Tailwind classes we used */
    --c-bg: #f8fafc;
    --c-panel: #ffffff;
    --c-card: #f1f5f9;
    --c-text-main: #0f172a;
    --c-text-muted: #334155;
    --c-text-soft: #475569;
    --c-border: #cbd5e1;
    --c-border-hover: #94a3b8;
    --c-input-bg: #f8fafc;
    --c-sidebar: #ffffff;
    --c-sidebar-hover: #e2e8f0;
}

html.theme-dark {
    --c-bg: #0f172a;
    --c-panel: #1e293b;
    --c-card: #334155;
    --c-text-main: #ffffff;
    --c-text-muted: #d1d5db;
    --c-text-soft: #9ca3af;
    --c-border: #475569;
    --c-border-hover: #64748b;
    --c-input-bg: #1e293b;
    --c-sidebar: #1e293b;
    --c-sidebar-hover: #334155;
}

html.theme-midnight {
    --c-bg: #000000;
    --c-panel: #0a0a0a;
    --c-card: #171717;
    --c-text-main: #f9fafb;
    --c-text-muted: #d1d5db;
    --c-text-soft: #a3a3a3;
    --c-border: #262626;
    --c-border-hover: #404040;
    --c-input-bg: #000000;
    --c-sidebar: #0a0a0a;
    --c-sidebar-hover: #171717;
}

/* Override tailwind classes globally based on theme variables */
.bg-bg { background-color: var(--c-bg) !important; }
.bg-bg-panel { background-color: var(--c-panel) !important; }
.bg-bg-card { background-color: var(--c-card) !important; }
.text-white { color: var(--c-text-main) !important; }
.text-gray-200 { color: var(--c-text-main) !important; }
.text-gray-300 { color: var(--c-text-muted) !important; }
.text-gray-400 { color: var(--c-text-soft) !important; }
.bg-gray-800 { background-color: var(--c-input-bg) !important; }
.bg-gray-700 { background-color: var(--c-sidebar) !important; }
.hover\:bg-gray-700:hover { background-color: var(--c-sidebar-hover) !important; }
.border-gray-700 { border-color: var(--c-border) !important; }
.border-gray-600 { border-color: var(--c-border-hover) !important; }
.text-emerald-400 { color: var(--c-success) !important; }
.text-red-400 { color: var(--c-danger) !important; }

/* Base text color applies automatically to body */
body {
    color: var(--c-text-main);
}

/* Custom Scrollbars to match dark theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--c-bg); 
}

::-webkit-scrollbar-thumb {
    background: var(--c-border); 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--c-border-hover); 
}

/* Base Form elements reset */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* Animations */
.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
