@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/Inter-Bold.woff2') format('woff2');
}

:root {
    --bg-app: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-main: #e2e8f0;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-rgb: 79, 70, 229;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(226, 232, 240, 0.8);
    --shadow-main: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --input-bg: #ffffff;
}

html.dark {
    --bg-app: #090d16;
    --bg-card: #111827;
    --bg-sidebar: #090d16;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-main: #1f293d;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-rgb: 99, 102, 241;
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(31, 41, 61, 0.8);
    --shadow-main: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --input-bg: #1f2937;
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Base custom classes to augment Tailwind */
.theme-bg-app { background-color: var(--bg-app) !important; }
.theme-bg-card { background-color: var(--bg-card) !important; }
.theme-bg-sidebar { background-color: var(--bg-sidebar) !important; }
.theme-text-main { color: var(--text-main) !important; }
.theme-text-muted { color: var(--text-muted) !important; }
.theme-border-main { border-color: var(--border-main) !important; }
.theme-input-bg { background-color: var(--input-bg) !important; }

.theme-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-main);
    box-shadow: var(--shadow-main);
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -8px rgba(var(--primary-rgb), 0.15);
}

.theme-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.theme-btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    transition: background-color 0.2s ease;
}
.theme-btn-primary:hover {
    background-color: var(--primary-hover);
}

/* Micro-animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Theme overrides for Select Options */
select option {
    background-color: var(--bg-card);
    color: var(--text-main);
}

/* Dropdown Menu Item overrides */
#lang-menu-options a:hover, #theme-menu-options a:hover {
    background-color: var(--border-main) !important;
    color: var(--text-main) !important;
}

#lang-menu-options a.font-bold, #theme-menu-options a.font-bold {
    color: var(--primary) !important;
}

/* Sidebar navigation item readability fixes */
aside a {
    color: #cbd5e1 !important; /* hex fallback text-gray-300 */
    transition: all 0.2s ease;
}

aside a:hover {
    color: #ffffff !important;
    background-color: #1e293b !important;
}

aside a[class*="bg-indigo-600"] {
    color: #ffffff !important;
    background-color: rgba(79, 70, 229, 0.3) !important;
}
