/* Additional dark mode fixes and enhancements */

/* Fix for specific UI elements that might need adjustment */
.dark .bg-white/80,
.dark .bg-white/90 {
    background-color: rgba(15, 23, 42, 0.8) !important;
}

.dark .bg-gray-900/80,
.dark .bg-gray-900/90 {
    background-color: rgba(15, 23, 42, 0.8) !important;
}

/* Improve text readability */
.dark p, 
.dark span, 
.dark div, 
.dark h1, 
.dark h2, 
.dark h3, 
.dark h4, 
.dark h5, 
.dark h6 {
    color: rgba(226, 232, 240, 0.95) !important;
}

/* Improve link colors */
.dark a:not(.btn):not(.bg-blue-600):not([class*="bg-"]) {
    color: rgba(226, 232, 240, 0.9) !important; /* Light gray instead of blue */
}

.dark a:hover:not(.btn):not(.bg-blue-600):not([class*="bg-"]) {
    color: rgba(255, 255, 255, 1) !important; /* White on hover */
}

/* Fix navbar links specifically */
.dark .text-gray-700.hover\:text-blue-600,
.dark .dark\:text-gray-300,
.dark .dark\:text-gray-400 {
    color: rgba(255, 255, 255, 0.8) !important;
}

.dark .text-gray-700.hover\:text-blue-600:hover,
.dark .dark\:text-gray-300.dark\:hover\:text-blue-400:hover,
.dark .dark\:text-gray-400:hover {
    color: rgba(255, 255, 255, 1) !important;
}

/* Improve active tab indication */
.dark .border-blue-500.text-blue-600,
.dark .dark\:text-blue-400 {
    color: rgba(255, 255, 255, 1) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
}

/* Improve button aesthetics */
.dark button:not([class*="bg-"]),
.dark .btn:not([class*="bg-"]) {
    background-color: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(100, 116, 139, 0.3) !important;
}

.dark button:hover:not([class*="bg-"]),
.dark .btn:hover:not([class*="bg-"]) {
    background-color: rgba(30, 41, 59, 0.9) !important;
}

/* Improve dropdown menus */
.dark [x-cloak][class*="absolute"],
.dark [x-cloak][class*="fixed"] {
    background-color: rgba(30, 41, 59, 0.95) !important;
    border-color: rgba(100, 116, 139, 0.2) !important;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3) !important;
}

/* Improve badges and tags */
.dark .badge,
.dark .tag,
.dark [class*="badge-"],
.dark [class*="tag-"] {
    background-color: rgba(51, 65, 85, 0.6) !important;
    border-color: rgba(100, 116, 139, 0.2) !important;
}

/* Improve scrollbars in dark mode */
.dark ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.dark ::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.5);
    border-radius: 5px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.7);
}

/* Logo styles are now handled inline with Alpine.js */

/* Improve dark mode background */
.dark body {
    background-color: #1a202c !important; /* Slightly lighter dark blue for better contrast */
}

.dark .bg-slate-800, .dark .bg-slate-900 {
    background-color: #1a202c !important; /* Slightly lighter dark blue for better contrast */
}

/* Improve header in dark mode */
.dark header {
    background-color: rgba(26, 32, 44, 0.95) !important; /* More opaque for better contrast */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Custom styles for logo in dark mode */
.logo-dark-mode {
    filter: brightness(2) contrast(1.2) drop-shadow(0 0 3px rgba(0,0,0,0.5)) !important;
}

/* High-quality image rendering for logos */
img[src*="logo_final.png"] {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: translateZ(0); /* Force GPU acceleration */
    backface-visibility: hidden; /* Prevent blurry text during animations */
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: grayscale;
}