/* =========================================
   Global Dark Mode & UI Aesthetics
   ========================================= */
:root {
    --bg-main: #0b0f19;
    --bg-secondary: #111827;
    --bg-panel: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #b8cfe8;
    --accent-primary: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --accent-secondary: #8b5cf6;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.05);
}

html, body {
    height: 100%;
    background-color: var(--bg-main) !important;
    color: var(--text-primary) !important;
    font-family: 'Cairo', sans-serif;
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
}

.container-fluid {
    flex: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Navbar */
.navbar {
    background-color: rgba(11, 15, 25, 0.8) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-link:hover::after {
    width: 100%;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Buttons */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* Cards & Panels (Glassmorphism) */
.card, .glass-panel {
    background: var(--bg-panel) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    color: var(--text-primary) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover, .glass-panel:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4), 0 0 15px var(--accent-glow);
}

/* Inputs */
.form-control, .form-select {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 0.25rem var(--accent-glow) !important;
}

.form-control::placeholder, .form-select::placeholder {
    color: #ffffff !important;
    opacity: 0.7 !important;
}

/* Footer */
footer {
    background-color: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
}

/* Animations */
.fa-spin-hover:hover {
    animation: fa-spin 2s infinite linear;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: 0.5px;
}
.text-muted {
    color: var(--text-secondary) !important;
}

/* Hero Section override for Dark Mode */
.hero-section {
    background: linear-gradient(to right, rgba(11, 15, 25, 0.9), rgba(11, 15, 25, 0.4)), url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') !important;
    background-size: cover !important;
    background-position: center !important;
    border-bottom: 1px solid var(--border-color);
    height: 80vh;
    position: relative;
    width: 100%;
}

.scroll-down-btn {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .display-3 { font-size: 2.5rem; }
    .display-4 { font-size: 2rem; }
    .hero-section { height: 60vh !important; }
}
