@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@700;800&display=swap');

:root {
    /* Color Palette - Premium & Modern */
    --primary: #DC2626;
    --primary-dark: #B91C1C;
    --primary-light: #FEE2E2;
    --secondary: #2563EB;
    --secondary-dark: #1E40AF;
    --secondary-light: #DBEAFE;
    --accent: #F59E0B;
    --success: #10B981;
    --bg-light: #F9FAFB;
    --bg-dark: #0F172A;
    --sidebar-bg: #0F172A;
    --sidebar-text: #94A3B8;
    --sidebar-active: #F8FAFC;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;

    /* Effects */
    --glass: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 1.25rem;
    --section-gap: 6rem;
}

/* Base Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

.float-anim {
    animation: float 4s ease-in-out infinite;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #ef4444);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Global Logo Animation */
.logo-heartbeat {
    animation: simple-heartbeat 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes simple-heartbeat {
    0% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.2);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.1);
    }

    60% {
        transform: scale(1);
    }
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.8;
    /* Increased for readability */
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Public Header (Landing, Login, Register) --- */
.header {
    height: 80px;
    display: flex;
    align-items: center;
    background: var(--glass);
    backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.header.scrolled {
    height: 70px;
    background: white;
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.logo i {
    font-size: 1.75rem;
}

.nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav a:hover::after {
    width: 100%;
}

/* --- Dashboard Layout --- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--sidebar-bg);
    color: white;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    padding: 0 0.75rem;
    color: var(--primary);
}

.sidebar-nav {
    list-style: none;
    flex-grow: 1;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    color: var(--sidebar-text);
    text-decoration: none;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.sidebar-nav a.active {
    background: rgba(220, 38, 38, 0.1);
    /* Red glow for donor active */
    color: white;
    box-shadow: inset 4px 0 0 0 var(--primary);
}

body.recipient-theme .sidebar-logo {
    color: var(--secondary);
}

body.recipient-theme .sidebar-nav a.active {
    background: rgba(37, 99, 235, 0.1);
    box-shadow: inset 4px 0 0 0 var(--secondary);
}

.main-content {
    background: var(--bg-light);
    padding: 2.5rem 3rem;
    overflow-y: auto;
}

/* --- Utilities --- */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    padding: 0.75rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--text-muted);
}

/* Card Styling */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* --- Landing Page Sections --- */
.hero {
    padding: 160px 0 100px;
    background:
        radial-gradient(circle at 10% 20%, rgba(220, 38, 38, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 40%);
    text-align: center;
}

.hero-title {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 4rem;
    line-height: 1.9;
}

.section-gap {
    margin-top: var(--section-gap);
    margin-bottom: var(--section-gap);
}

.role-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 4rem;
}

/* Multi-language selector */
.lang-toggle {
    display: flex;
    background: #F1F5F9;
    padding: 0.35rem;
    border-radius: 2rem;
}

.btn-lang {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: var(--transition);
}

.btn-lang.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Status Labels */
.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-urgent {
    background: #FEE2E2;
    color: #DC2626;
}

.status-success {
    background: #D1FAE5;
    color: #059669;
}

/* Responsive Grid */
@media (max-width: 768px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .nav {
        display: none;
    }

    .hero-title {
        font-size: 3.5rem;
    }
}
/* --- Extended Formatting Utilities --- */
.text-center {
    text-align: center;
}

/* --- Improved Hero Stats --- */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    border-top: 4px solid var(--primary);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.stat-info .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.stat-info .stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* --- "How It Works" / "Why We Fit Together" Beautification --- */
.how-it-works {
    background: radial-gradient(circle at top center, #f8fafc, #fff 40%);
    overflow: hidden;
}

.section-title {
    font-size: 3rem;
     margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.steps-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding: 0 2rem;
}

/* Connecting Line */
.progress-line {
    position: absolute;
    top: 50px;
    left: 50px;
    right: 50px;
    height: 3px;
    background: #e2e8f0;
    z-index: 0;
    background-image: linear-gradient(to right, var(--primary) 50%, #e2e8f0 50%);
    background-size: 200% 100%;
    background-position: 100% 0;
    transition: all 1s ease;
}

.how-it-works:hover .progress-line {
    background-position: 0 0;
}

/* Individual Steps */
.step-card {
    position: relative;
    z-index: 1;
    width: 22%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    transition: var(--transition);
    border: 3px solid white;
}

.step-card:hover .step-icon-wrapper {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(220, 38, 38, 0.05);
    border-color: var(--primary);
}

.step-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-number {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
}

.step-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.step-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Responsive adjustments for new elements */
@media (max-width: 992px) {
    .steps-container {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .progress-line {
        display: none;
        /* Hide horizonatal line on mobile */
    }

    .step-card {
        width: 100%;
        max-width: 400px;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 1.5rem;
        background: white;
        padding: 1.5rem;
        border-radius: 1.5rem;
        box-shadow: var(--shadow);
    }

    .step-icon-wrapper {
        margin-bottom: 0;
        width: 70px;
        height: 70px;
        flex-shrink: 0;
    }
    
    .step-icon {
        font-size: 1.75rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }
}
/* Floating Theme Toggle - Global */
.theme-toggle {
    position: fixed;
    top: 100px;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
}
/* --- Rich Footer --- */
.footer {
    background: var(--bg-dark);
    color: #94a3b8;
    padding: 5rem 0 0;
    font-size: 0.95rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-section h4 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.footer-section p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    text-align: center;
    color: #64748b;
}

/* --- Premium Form Styling --- */
.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: block;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    background: #f8fafc;
}

.form-group input:focus,
.form-group select:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    outline: none;
}

.login-container,
.register-container {
    border: none;
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}
