/* --- Base Variables & Setup --- */
        :root {
            --primary: #e63946; 
            --primary-hover: #d62828;
            --bg-light: #f8f9fa;
            --text-main: #2b2d42;
            --text-muted: #6c757d;
            --border: #dee2e6;
            --card-bg: #ffffff;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html {
            scroll-behavior: smooth;
            scroll-padding-top: 80px; 
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-light);
            color: var(--text-main);
            line-height: 1.6;
            padding-top: 70px; 
            position: relative;
            overflow-x: hidden;
        }

        /* --- Animated Background --- */
        /* --- Background Animation using your Image --- */
        .bg-animation {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: -1; 
            overflow: hidden;
            pointer-events: none; 
            background-color: var(--bg-light);
        }

        .bg-item {
            position: absolute;
            width: 120px; /* Adjust size as needed */
            height: 120px;
            background-image: url('../img/blood_2309152.png');
            background-size: contain;
            z-index: 0;
            background-repeat: no-repeat;
            opacity: 0.1; /* Keeps it subtle */
            animation: float linear infinite;
        }

        /* Positioning the instances */
        .item-1 { width: 150px; height: 150px; left: 5%; top: 10%; animation-duration: 30s; }
        .item-2 { width: 200px; height: 200px; left: 75%; top: 5%; animation-duration: 40s; animation-direction: reverse; }
        .item-3 { width: 100px; height: 100px; left: 40%; top: 60%; animation-duration: 25s; }
        .item-4 { width: 180px; height: 180px; left: 10%; top: 70%; animation-duration: 35s; }
        .item-5 { width: 130px; height: 130px; left: 80%; top: 75%; animation-duration: 28s; }

        @keyframes float {
            0% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-50px) rotate(180deg); }
            100% { transform: translateY(0) rotate(360deg); }
        }

        .c1 { width: 120px; height: 120px; left: 10%; top: 20%; animation-duration: 25s; }
        .c2 { width: 180px; height: 160px; left: 80%; top: 15%; animation-duration: 35s; animation-direction: reverse; }
        .c3 { width: 90px; height: 90px; left: 50%; top: 70%; animation-duration: 28s; }
        .p1 { width: 200px; height: 180px; left: -5%; top: 60%; animation-duration: 40s; }
        .p2 { width: 150px; height: 160px; left: 85%; top: 80%; animation-duration: 32s; }

        @keyframes float {
            0% { transform: translateY(0) rotate(0deg) scale(1); }
            33% { transform: translateY(-30px) rotate(120deg) scale(1.05); }
            66% { transform: translateY(20px) rotate(240deg) scale(0.95); }
            100% { transform: translateY(0) rotate(360deg) scale(1); }
        }

        /* --- Global Alignment Container --- */
        .container { 
            max-width: 1200px; 
            margin: 0 auto; 
            padding: 0 1rem; 
        }

        /* --- Fixed Glassmorphism Navbar --- */
        .navbar {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 1000;
            background-color: rgba(255, 255, 255, 0.85); 
            backdrop-filter: blur(12px); 
            -webkit-backdrop-filter: blur(12px);
            transition: box-shadow 0.3s ease;
            padding: 1rem 0;
            border-bottom: 1px solid var(--border);
        }

        .nav-container {
            max-width: 1200px;
            width: 100%;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 1rem;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--text-main);
        }
        .logo .dot { color: var(--primary); }

        .nav-links {
            display: flex;
            align-items: center;
        }

        .nav-links a {
            text-decoration: none;
            color: var(--text-main);
            margin-left: 1.5rem;
            font-weight: 600;
            font-size: 0.9rem;
        }

        .hamburger {
            display: none;
            cursor: pointer;
            flex-direction: column;
            gap: 6px;
            z-index: 101;
        }

        .hamburger .bar {
            width: 28px;
            height: 3px;
            background-color: var(--text-main);
            border-radius: 4px;
            transition: all 0.3s ease-in-out;
        }

        /* --- Buttons --- */
        .btn-primary, .btn-secondary, .btn-outline {
            padding: 0.6rem 1.2rem;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
        }

        .btn-primary { background-color: var(--primary); color: white; margin-top: 1rem; }
        .btn-primary:hover { background-color: var(--primary-hover); }

        .btn-secondary { background-color: var(--bg-light); color: var(--primary); border: 1px solid var(--primary); margin-top: 1rem; }
        .btn-secondary:hover { background-color: var(--primary); color: white; }

        .btn-outline { border: 1px solid var(--border); background: transparent; }

        /* --- Scroll Reveal Transitions --- */
        .reveal {
            opacity: 0;
            transform: translateY(40px); 
            transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); 
        }
        .reveal.active {
            opacity: 1;
            transform: translateY(0); 
        }

        /* --- Hero Slider --- */
        .hero-slider {
            position: relative;
            height: 70vh;
            min-height: 500px;
            width: 100vw;
            margin-left: calc(-50vw + 50%);
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 3rem;
        }

        .slide {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transition: opacity 0.8s ease-in-out;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 1rem;
            z-index: 1;
        }

        .slide.active { opacity: 1; z-index: 2; }

        .slide-content {
            width: 100%;
            max-width: 1200px;
            text-align: center;
            padding: 4rem 1rem;
            transform: translateY(20px);
            transition: transform 0.8s ease-out;
            /* Removed white background and glass effect */
            background: transparent;
            border: none;
            box-shadow: none;
            backdrop-filter: none;
        }

        .slide.active .slide-content { transform: translateY(0); }

        .slide-tag {
            display: inline-block;
            background: rgba(230, 57, 70, 0.1);
            color: var(--primary);
            padding: 0.4rem 1rem;
            border-radius: 30px;
            font-size: 0.85rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 1rem;
        }

        .slide-content h1 {
            font-size: 4rem;
            color: var(--text-main);
            margin-bottom: 1rem;
            line-height: 1.1;
        }

        .slide-content p {
            font-size: 1.2rem;
            color: var(--text-muted);
            margin-bottom: 2.5rem;
            max-width: 700px;
            margin-left: auto;
            margin-right: auto;
        }

        .hero-buttons { display: flex; gap: 1rem; justify-content: center; }
        .hero-buttons a { text-decoration: none; width: auto; padding: 0.8rem 2rem; margin: 0; }

        .slider-controls {
            position: absolute;
            bottom: 2rem;
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 2rem;
            z-index: 10;
        }

        .slider-arrow {
            background: rgba(255, 255, 255, 0.5);
            border: none;
            color: var(--text-main);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.5rem 1rem;
            border-radius: 50%;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
        }
        .slider-arrow:hover { background: var(--primary); color: white; }

        .slider-dots { display: flex; gap: 0.8rem; }
        .slider-dots .dot { width: 12px; height: 12px; background: rgba(0, 0, 0, 0.2); border-radius: 50%; cursor: pointer; transition: background 0.3s ease; }
        .slider-dots .dot.active { background: var(--primary); transform: scale(1.2); }

        /* --- Dashboard Layout --- */
        .dashboard {
            display: grid;
            grid-template-columns: 300px 1fr;
            gap: 2rem;
            max-width: 1200px;
            margin: 2rem auto;
            padding: 0 1rem;
        }

        /* Filters Sidebar */
        .filters {
            background: rgba(255, 255, 255, 0.9);
            padding: 1.5rem;
            border-radius: 12px;
            border: 1px solid var(--border);
            height: fit-content;
            backdrop-filter: blur(5px);
        }

        .filters h3 { margin-bottom: 1.5rem; font-size: 1.2rem; }
        .filter-group { margin-bottom: 1.2rem; }
        .filter-row { display: flex; gap: 1rem; }
        label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text-muted); }
        input[type="text"], input[type="number"], select { width: 100%; padding: 0.6rem; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; }
        input[type="range"] { width: 100%; accent-color: var(--primary); }
        .filters .btn-primary { width: 100%; }

        /* Results Area */
        .results-header h2 { display: flex; align-items: center; gap: 1rem; }
        .badge { background: var(--primary); color: white; font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: 20px; }
        .results-header p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }

        .donor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

        .donor-card {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            transition: transform 0.2s ease;
            backdrop-filter: blur(5px);
        }

        .donor-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
        .blood-badge { background: rgba(230, 57, 70, 0.1); color: var(--primary); font-size: 1.5rem; font-weight: 700; padding: 0.5rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
        .donor-info h4 { margin-bottom: 0.3rem; }
        .meta { font-size: 0.85rem; color: var(--text-muted); }
        .donor-card .btn-secondary { width: 100%; }

        /* --- Educational Section --- */
        .education-section {
            background-color: rgba(255, 255, 255, 0.95);
            padding: 5rem 0;
            border-top: 1px solid var(--border);
            position: relative;
        }

        .section-header { text-align: center; margin-bottom: 3rem; }
        .section-header h2 { font-size: 2.2rem; color: var(--text-main); margin-bottom: 0.5rem; }
        .section-header p { color: var(--text-muted); font-size: 1.1rem; }

        .info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
        .info-card { background: var(--bg-light); padding: 2rem; border-radius: 12px; border: 1px solid var(--border); }
        .highlight-card { background: rgba(230, 57, 70, 0.05); border-color: rgba(230, 57, 70, 0.2); }
        .info-card .icon { font-size: 2.5rem; margin-bottom: 1rem; }
        .info-card h3 { margin-bottom: 1rem; color: var(--text-main); }
        .info-card p { color: var(--text-muted); font-size: 0.95rem; }

        /* --- Footer --- */
        .footer { background-color: var(--text-main); color: white; padding: 4rem 0 1rem 0; position: relative; }
        .footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
        .footer-brand p { color: #a0aab2; margin-top: 1rem; max-width: 300px; }
        .footer h4 { margin-bottom: 1.5rem; font-size: 1.1rem; }
        .footer-links a, .footer-contact p { display: block; color: #a0aab2; text-decoration: none; margin-bottom: 0.8rem; transition: color 0.2s ease; }
        .footer-links a:hover { color: white; }
        .footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); color: #a0aab2; font-size: 0.9rem; }

        /* --- Mobile Responsiveness --- */
        @media (max-width: 768px) {
            .hamburger { display: flex; }
            .nav-links {
                position: absolute;
                top: 100%;
                left: -100%; 
                width: 100%;
                background-color: rgba(255, 255, 255, 0.98);
                backdrop-filter: blur(12px);
                flex-direction: column;
                padding: 2rem;
                box-shadow: 0 10px 15px rgba(0,0,0,0.05);
                transition: left 0.3s ease-in-out;
                border-bottom: 1px solid var(--border);
            }
            .nav-links.active { left: 0; }
            .nav-links a { margin: 1rem 0; text-align: center; display: block; }
            .hamburger.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
            .hamburger.active .bar:nth-child(2) { opacity: 0; }
            .hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
            
            .hero-slider { height: 80vh; }
            .slide-content h1 { font-size: 2.2rem; }
            .slide-content p { font-size: 1rem; }
            .hero-buttons { flex-direction: column; }
            .hero-buttons a { width: 100%; }

            .dashboard { grid-template-columns: 1fr; margin-top: 1rem; }
            .footer-content { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
            .footer-brand p { margin: 1rem auto; }
        }


/* Modal Backdrop & Container */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px);
    display: none; justify-content: center; align-items: center; z-index: 2000;
}
.modal-content {
    background: white; padding: 2.5rem; border-radius: 16px;
    width: 100%; max-width: 400px; box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative; animation: slideIn 0.3s ease-out;
}
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Form Elements */
.auth-input { width: 100%; padding: 0.8rem; margin: 0.5rem 0 1.5rem; border: 1px solid var(--border); border-radius: 8px; }
.auth-error { color: var(--primary); font-size: 0.8rem; margin-top: -1rem; margin-bottom: 1rem; display: none; }

/* Toast Notification Container */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-left: 5px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Layout Wrapper */
.auth-wrapper {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Reusing your Modal content style for consistency */
.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.auth-input {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: block;
}

.auth-error {
    color: var(--primary);
    font-size: 0.8rem;
    margin-top: -1rem;
    margin-bottom: 1rem;
    display: none;
}