/* Fonts */
body { font-family: 'Inter', sans-serif; }
h1, h2, h3 { font-family: 'Playfair Display', serif; }

/* Sidebar nav links */
.sidebar-link:hover { background-color: #f3f4f6; color: #111827; }
.sidebar-link.active { background-color: #e5e7eb; color: #000; }

/* Dark Mode */
.dark body { background-color: #111827; color: #f3f4f6; }
.dark nav { background-color: #1f2937; border-color: #374151; }
.dark .sidebar-link:hover { background-color: #374151; color: #f3f4f6; }
.dark .sidebar-link.active { background-color: #4b5563; color: #fff; }
.dark h1, .dark h2, .dark h3, .dark h4 { color: #f3f4f6; }
.dark p { color: #d1d5db; }
.dark .bg-white { background-color: #1f2937; }
.dark .border-gray-100 { border-color: #374151; }
.dark .border-gray-200 { border-color: #4b5563; }
.dark .text-gray-600 { color: #9ca3af; }
.dark .text-gray-500 { color: #6b7280; }
.dark .text-gray-400 { color: #9ca3af; }
.dark .text-gray-700 { color: #d1d5db; }
.dark .text-gray-900 { color: #f3f4f6; }
.dark .shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5); }
.dark .shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3); }

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover { background-color: #e5e7eb; }
.dark .theme-toggle:hover { background-color: #374151; }
.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: all 0.5s ease;
}
.theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}
.theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
    position: absolute;
}
.dark .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}
.dark .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Input / Textarea */
input, textarea { transition: all 0.3s; }
input:focus, textarea:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}
.dark input, .dark textarea {
    background-color: #1f2937;
    border-color: #4b5563;
    color: #f3f4f6;
}
.dark input:focus, .dark textarea:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Button */
button { box-sizing: border-box; max-width: 100%; }
.dark button:not(.filter-btn) { background-color: #374151; }
.dark button:not(.filter-btn):hover { background-color: #16a34a; }

/* Research paper cards */
.paper-card {
    background-color: #ffffff;
    border: 1px solid #e6eef8;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.10);
    border-radius: 0.75rem;
}
.paper-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(2, 6, 23, 0.12);
}
.dark .paper-card {
    background-color: #111827;
    border-color: #374151;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.dark .paper-card:hover {
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}

/* Research badge dark overrides */
.dark .bg-green-100 { background-color: #064e3b; }
.dark .text-green-800 { color: #6ee7b7; }
.dark .bg-blue-100 { background-color: #1e3a8a; }
.dark .text-blue-800 { color: #93c5fd; }
.dark .bg-purple-100 { background-color: #581c87; }
.dark .text-purple-800 { color: #d8b4fe; }

/* Research filter tabs */
.filter-btn {
    background: transparent;
    border: none;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid transparent;
    color: #6b7280; /* tailwind gray-500 */
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
    background-color: transparent;
}
.filter-btn:hover {
    color: #374151; /* gray-700 */
    background-color: transparent;
}

/* Active/inactive states */
.filter-btn.inactive {
    color: #6b7280;
    opacity: 0.95;
    border-bottom-color: transparent;
}
.filter-btn.active {
    color: #0f766e; /* green-700 approximation */
    border-bottom-color: #16a34a; /* green-600 */
    background-color: transparent;
}

/* Dark mode adjustments */
.dark .filter-btn {
    background-color: transparent;
    color: #9ca3af; /* gray-400 */
}
.dark .filter-btn:hover {
    color: #d1d5db;
}
.dark .filter-btn.inactive {
    color: #9ca3af;
    opacity: 0.95;
}
.dark .filter-btn.active {
    color: #bbf7d0; /* green-200 */
    border-bottom-color: #10b981; /* green-500 */
}

/* Keep compatibility with previous tailwind-class toggles */
.filter-btn.border-green-600 { border-bottom-color: #16a34a; }
.filter-btn.text-green-700 { color: #0f766e; }
.filter-btn.border-transparent { border-bottom-color: transparent; }
.filter-btn.text-gray-500 { color: #6b7280; }

