/* Core Variables */
:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #fef2f2;
    --bg-main: #ffffff;
    --bg-sec: #f1f5f9;
    --text-main: #0f172a;
    --text-sec: #64748b;
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.05);
    --navbar-bg: rgba(255, 255, 255, 0.9);
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body.dark-theme {
    --primary-light: rgba(242, 13, 13, 0.15);
    --bg-main: #0f172a;
    --bg-sec: #1e293b;
    --text-main: #f8fafc;
    --text-sec: #cbd5e1;
    --card-bg: #1e293b;
    --border-color: rgba(255, 255, 255, 0.1);
    --navbar-bg: rgba(15, 23, 42, 0.9);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.5);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

.text-primary {
    color: var(--primary);
}

.text-primary-dark {
    color: var(--primary-dark);
}

.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.39);
}

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

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-warning {
    background-color: #ef4444;
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
}

.btn-warning:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.23);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* Scroll Progress */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1001;
}

.scroll-progress {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
}

/* CENTER: text nav links */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-sec);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-main);
    background: var(--bg-sec);
}

.nav-links a.text-primary-dark {
    color: var(--primary);
    font-weight: 700;
}

/* RIGHT: action buttons, icons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.nav-cta {
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.login-btn {
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    border-color: var(--border-color);
    color: var(--text-main);
}

@media (max-width: 1100px) {
    .nav-links a[href="#dashboard"],
    .nav-links a[href="#feedback"] { display: none; }
}
@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-actions { gap: 0.4rem; }
    #donorNavBtn { display: none; }
}

/* Logged-In User Badge */
.user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-sec);
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}

#userName {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
    white-space: nowrap;
    padding: 0;
}

.btn-logout:hover {
    text-decoration: underline;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Ticker (Marquee) */
.ticker-wrap {
    width: 100%;
    height: 40px;
    background-color: var(--primary-dark);
    color: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    white-space: nowrap;
    position: fixed;
    top: 76px;
    z-index: 999;
}

.ticker {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 25s linear infinite;
}

.ticker:hover {
    animation-play-state: paused;
}

.ticker-item {
    padding: 0 3rem;
    font-weight: 600;
    font-size: 0.95rem;
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Hero Section */
.hero {
    padding: 14rem 2rem 6rem;
    background: radial-gradient(circle at top right, var(--primary-light), var(--bg-main));
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-sec);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-inline: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Dashboard Section */
.dashboard {
    padding: 8rem 2rem;
    background-color: var(--bg-sec);
}

.dashboard-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.chart-container {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chart-container:hover {
    box-shadow: 0 0 25px rgba(220, 38, 38, 0.15);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.chart-container h3 {
    margin-bottom: 2rem;
    color: var(--text-main);
    font-size: 1.25rem;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.5rem;
}

/* Compatibility Matrix Premium Layout */
.compat-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.compat-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.compat-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.compat-btn:hover {
    border-color: var(--primary-light);
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.15);
    transform: translateY(-5px);
}

.compat-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.39);
    transform: scale(1.1);
}

.compat-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

@media (max-width: 800px) {
    .compat-layout {
        flex-direction: column;
        text-align: center;
    }
}

.compat-center {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.selected-blood-display {
    width: 100px;
    height: 100px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    z-index: 2;
    box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.39);
}

.pulse-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary);
    z-index: 1;
    animation: pulse 2s infinite ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.compat-box {
    flex: 1;
}

.compat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--bg-sec);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 800px) {
    .compat-icon {
        margin: 0 auto 1rem;
    }
}

.compat-box h4 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-size: 1.3rem;
    font-weight: 800;
}

.compat-desc {
    color: var(--text-sec);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.blood-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

@media (max-width: 800px) {
    .blood-badges {
        justify-content: center;
    }
}

.badge-bg {
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
}

.donate-badge {
    background: rgba(220, 38, 38, 0.1);
    color: var(--primary);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.receive-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Features Section */
.features {
    padding: 8rem 2rem;
    background-color: var(--bg-main);
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-sec);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.15);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    background-color: var(--primary-light);
    padding: 1rem;
    border-radius: 1rem;
}

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

.feature-card p {
    color: var(--text-sec);
}

/* Feedback Section */
.feedback {
    padding: 8rem 2rem;
    background-color: var(--bg-sec);
}

.feedback-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.feedback-grid {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 1.5rem;
}

.feedback-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    flex: 1 1 calc(50% - 1.5rem);
    min-width: 250px;
    transition: var(--transition);
}

.feedback-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(220, 38, 38, 0.15);
    border-color: var(--primary);
}

.feedback-card .quote {
    color: var(--text-sec);
    font-style: italic;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.feedback-card .author {
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
}

/* Forms Common Styles */
.request-blood {
    padding: 8rem 2rem;
    background-color: var(--bg-main);
}

.registration {
    padding: 8rem 2rem;
    background-color: #0f172a;
    color: #fff;
}

/* Dark registry for pop effect */
.registration-container,
.request-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.registration-text p {
    color: #94a3b8;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.request-text h2,
.registration-text h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.request-text p {
    color: var(--text-sec);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.alert-box {
    background-color: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.stats {
    display: flex;
    gap: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
}

.stat-label {
    color: var(--primary);
    font-weight: 600;
}

.feedback-form-wrapper {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    height: fit-content;
}

.request-form-wrapper {
    background: var(--bg-sec);
    padding: 3rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.registration-form-wrapper {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.feedback-form-wrapper h3,
.request-form-wrapper .form-group label {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 500;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.registration-form-wrapper .form-group label {
    color: #cbd5e1;
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.registration-form-wrapper input,
.registration-form-wrapper select {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.registration-form-wrapper select option {
    background-color: #1e293b;
    color: #fff;
}

.registration-form-wrapper input:focus,
.registration-form-wrapper select:focus {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.15);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Footer */
.footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 6rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.footer-brand .footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-desc {
    margin-bottom: 2rem;
    line-height: 1.8;
}

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

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

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

.footer-links h4,
.footer-contact h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    animation: slideIn 0.3s ease-out forwards;
}

.toast.fade-out {
    animation: fadeOut 0.5s ease-in forwards;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hamburger Menu (Mobile) */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: var(--transition);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

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

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Media Queries */
@media (max-width: 900px) {

    .registration-container,
    .request-container,
    .dashboard-grid,
    .feedback-container {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-actions {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        background-color: var(--card-bg);
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem 2rem;
        gap: 1rem;
        box-shadow: var(--shadow-md);
        z-index: 999;
    }

    .nav-links.active,
    .nav-actions.active {
        display: flex;
    }

    .nav-links a[href="#dashboard"],
    .nav-links a[href="#feedback"] { display: flex; }

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* --- Showcase Features (New) --- */

/* Login Button Adjustment */
.login-btn {
    padding: 0.45rem 0.9rem;
    border-color: var(--border-color);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Shrink Become a Donor in navbar */
#donorNavBtn {
    padding: 0.45rem 0.9rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Hide lower-priority links on medium viewports */
@media (max-width: 1100px) {
    .nav-links a[href="#features"],
    .nav-links a[href="#feedback"] { display: none; }
}
@media (max-width: 960px) {
    .nav-links a[href="#dashboard"],
    .nav-links a[href="#home"] { display: none; }
}

/* Typewriter & Cursor */
.typewriter {
    font-weight: 800;
}

.cursor {
    font-weight: 400;
    color: var(--primary);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Ambient Orbs */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    z-index: 1;
    animation: float 15s infinite ease-in-out alternate;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    filter: blur(100px);
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: rgba(59, 130, 246, 0.15);
    bottom: 10%;
    right: 15%;
    animation-delay: -5s;
    filter: blur(80px);
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(220, 38, 38, 0.15);
    top: 40%;
    right: 40%;
    animation-delay: -10s;
}

body.dark-theme .orb-1 {
    background: rgba(220, 38, 38, 0.2);
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* ====== PREMIUM SPLIT-PANEL LOGIN MODAL ====== */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.65); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 1; visibility: visible; transition: opacity 0.35s, visibility 0.35s; padding: 1rem; }
.modal-overlay.hidden { opacity: 0; pointer-events: none; visibility: hidden; }

/* Split container */
.modal-content.modal-split { display: flex; width: 95%; max-width: 860px; max-height: 90vh; border-radius: 1.5rem; overflow: hidden; box-shadow: 0 25px 60px rgba(0,0,0,0.35); transform: translateY(0); transition: transform 0.35s; }
.modal-overlay.hidden .modal-content { transform: translateY(40px); }

/* LEFT BRAND PANEL */
.modal-left { width: 40%; background: linear-gradient(145deg, #b91c1c 0%, #7f1d1d 60%, #450a0a 100%); padding: 2.5rem 2rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; flex-shrink: 0; }
.modal-left-orb { position: absolute; width: 280px; height: 280px; background: rgba(255,255,255,0.07); border-radius: 50%; bottom: -100px; right: -80px; pointer-events: none; }
.modal-left-logo { font-size: 1.4rem; font-weight: 800; color: white; margin-bottom: 2rem; }
.modal-left-logo span { color: #fca5a5; }
.modal-left-title { font-size: 2.2rem; font-weight: 800; color: white; line-height: 1.2; margin-bottom: 1rem; }
.modal-left-sub { color: rgba(255,255,255,0.75); font-size: 0.95rem; line-height: 1.7; margin-bottom: 2rem; }
.modal-left-stats { display: flex; gap: 1rem; margin-bottom: 2rem; }
.ml-stat { display: flex; flex-direction: column; background: rgba(255,255,255,0.1); padding: 0.8rem 1rem; border-radius: 0.75rem; flex: 1; }
.ml-num { font-size: 1.4rem; font-weight: 800; color: white; }
.ml-label { font-size: 0.75rem; color: rgba(255,255,255,0.7); margin-top: 0.2rem; }
.modal-left-testimonial { background: rgba(255,255,255,0.1); border-left: 3px solid rgba(255,255,255,0.4); padding: 1rem 1.2rem; border-radius: 0 0.5rem 0.5rem 0; }
.modal-left-testimonial p { color: rgba(255,255,255,0.9); font-style: italic; font-size: 0.9rem; line-height: 1.6; margin-bottom: 0.5rem; }
.testi-author { color: rgba(255,255,255,0.6); font-size: 0.8rem; font-weight: 600; }

/* RIGHT FORM PANEL */
.modal-right { flex: 1; background: var(--bg-main); padding: 2rem 2.5rem; overflow-y: auto; position: relative; min-width: 0; }
.modal-close { position: absolute; top: 1.2rem; right: 1.2rem; background: var(--bg-sec); border: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--text-sec); transition: var(--transition); }
.modal-close:hover { background: var(--primary); color: white; transform: rotate(90deg); }
.modal-right-header { margin-bottom: 1.5rem; }
.modal-right-header h3 { font-size: 1.6rem; font-weight: 800; color: var(--text-main); margin-bottom: 0.3rem; }
.modal-right-header p { color: var(--text-sec); font-size: 0.95rem; }

/* Tabs */
.modal-tabs { display: flex; gap: 0.5rem; background: var(--bg-sec); padding: 0.4rem; border-radius: 0.75rem; margin-bottom: 1.5rem; }
.tab-btn { flex: 1; padding: 0.65rem; background: transparent; border: none; font-size: 0.9rem; font-weight: 600; color: var(--text-sec); border-radius: 0.5rem; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 0.4rem; }
.tab-btn.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(220,38,38,0.35); }

/* Social Buttons */
.social-login { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
.btn-social { display: flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 0.75rem; border: 1.5px solid var(--border-color); background: var(--bg-main); border-radius: 0.6rem; cursor: pointer; transition: var(--transition); font-weight: 600; color: var(--text-main); font-size: 0.95rem; width: 100%; }
.btn-social:hover { background: var(--bg-sec); border-color: #cbd5e1; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.apple-btn { background: #000; color: #fff; border-color: #000; }
.apple-btn:hover { background: #111; }
body.dark-theme .apple-icon { filter: invert(1); }
body.dark-theme .apple-btn { background: #1a1a1a; border-color: #333; }

/* Divider */
.divider { display: flex; align-items: center; margin: 1rem 0; color: var(--text-sec); font-size: 0.8rem; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border-color); }
.divider span { padding: 0 0.75rem; }

/* Account Picker */
.account-picker { animation: fadeInUp 0.25s ease; }
.picker-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.picker-back { background: none; border: none; cursor: pointer; color: var(--primary); font-size: 0.95rem; font-weight: 700; padding: 0; transition: var(--transition); }
.picker-back:hover { transform: translateX(-3px); }
#pickerProviderName { font-weight: 700; font-size: 1rem; color: var(--text-main); }
.picker-logo-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; background: var(--bg-sec); padding: 1rem; border-radius: 0.75rem; }
.picker-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; border: 1px solid var(--border-color); background: var(--bg-main); }

/* Input Icons */
.input-icon-wrapper { position: relative; }
.input-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); font-size: 1rem; z-index: 10; }
.input-icon-wrapper input { padding-left: 3rem; }
.toggle-password { position: absolute; right: 0.8rem; top: 50%; transform: translateY(-50%); cursor: pointer; opacity: 0.5; transition: var(--transition); z-index: 10; font-size: 1.1rem; }
.toggle-password:hover { opacity: 1; }

/* Form options */
.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; font-size: 0.875rem; }
.remember-me { display: flex; align-items: center; gap: 0.4rem; color: var(--text-sec); cursor: pointer; }
.remember-me input { width: auto; }
.forgot-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }

/* Security badge */
.security-badge { background: rgba(16,185,129,0.08); color: #10b981; padding: 0.7rem 1rem; border-radius: 0.6rem; margin-bottom: 1.5rem; border: 1px solid rgba(16,185,129,0.2); font-size: 0.85rem; font-weight: 600; }

/* Modal form spacing */
.modal-form .form-group { margin-bottom: 1rem; }
.modal-form .form-group label { display: block; margin-bottom: 0.4rem; font-weight: 500; font-size: 0.875rem; color: var(--text-main); }
.modal-footer-text { text-align: center; margin-top: 1rem; font-size: 0.875rem; color: var(--text-sec); }
.modal-footer-text a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* Loading state */
.login-submit-btn { position: relative; overflow: hidden; }
.btn-loading { color: transparent !important; pointer-events: none; }
.btn-loading::after { content: ''; position: absolute; width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 0.9s linear infinite; left: 50%; top: 50%; margin-left: -10px; margin-top: -10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive: hide left panel on small screens */
@media (max-width: 680px) { .modal-left { display: none; } .modal-content.modal-split { max-width: 460px; } }

/* ====== NOTIFICATION BELL ====== */
.notif-wrap { position: relative; }
.notif-bell { background: none; border: none; font-size: 1.3rem; cursor: pointer; position: relative; padding: 0.3rem; transition: var(--transition); line-height: 1; }
.notif-bell:hover { transform: rotate(20deg) scale(1.15); }
.notif-badge { position: absolute; top: -4px; right: -6px; background: var(--primary); color: white; font-size: 0.65rem; font-weight: 800; min-width: 16px; height: 16px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; padding: 0 3px; border: 2px solid var(--bg-main); }
.notif-badge.hidden { display: none; }
.notif-dropdown { position: absolute; top: calc(100% + 12px); right: -10px; width: 320px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 1rem; box-shadow: 0 20px 40px rgba(0,0,0,0.15); z-index: 500; animation: fadeInUp 0.2s ease; overflow: hidden; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem 0.8rem; border-bottom: 1px solid var(--border-color); font-weight: 700; font-size: 0.95rem; color: var(--text-main); }
.notif-clear { background: none; border: none; color: var(--primary); font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.notif-clear:hover { text-decoration: underline; }
.notif-list { list-style: none; max-height: 280px; overflow-y: auto; }
.notif-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.85rem 1.2rem; border-bottom: 1px solid var(--border-color); transition: var(--transition); cursor: default; }
.notif-item:hover { background: var(--bg-sec); }
.notif-item:last-child { border-bottom: none; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 6px; }
.notif-dot.green { background: #10b981; }
.notif-dot.yellow { background: #f59e0b; }
.notif-text { font-size: 0.875rem; color: var(--text-main); line-height: 1.5; }
.notif-time { font-size: 0.75rem; color: var(--text-sec); margin-top: 0.2rem; }
.notif-empty { padding: 2rem; text-align: center; color: var(--text-sec); font-size: 0.95rem; }

/* ====== BLOOD AVAILABILITY SEARCH ====== */
.blood-search-section { background: var(--bg-main); padding: 5rem 2rem; }
.blood-search-container { max-width: 900px; margin: 0 auto; }
.search-header { text-align: center; margin-bottom: 2.5rem; }
.search-badge { display: inline-block; background: var(--primary-light); color: var(--primary); padding: 0.3rem 1rem; border-radius: 9999px; font-size: 0.85rem; font-weight: 700; margin-bottom: 1rem; }
.search-header h2 { font-size: 2.5rem; font-weight: 800; color: var(--text-main); margin-bottom: 0.5rem; }
.search-header p { color: var(--text-sec); font-size: 1rem; }
.search-bar-wrapper { max-width: 680px; margin: 0 auto 2rem; }
.search-bar { display: flex; align-items: center; background: var(--card-bg); border: 2px solid var(--border-color); border-radius: 1rem; padding: 0.5rem 0.5rem 0.5rem 1.2rem; gap: 0.75rem; box-shadow: var(--shadow-sm); transition: border-color 0.2s; }
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(220,38,38,0.08); }
.search-icon { font-size: 1.2rem; flex-shrink: 0; }
.search-select { flex: 1; background: none; border: none; outline: none; font-size: 1rem; font-family: inherit; font-weight: 600; color: var(--text-main); cursor: pointer; }
.search-btn { flex-shrink: 0; border-radius: 0.6rem; padding: 0.65rem 1.4rem; font-size: 0.95rem; }
.search-results { animation: fadeInUp 0.3s ease; }
.search-result-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; }
.result-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 1rem; padding: 1.5rem; text-align: center; transition: var(--transition); position: relative; overflow: hidden; }
.result-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.result-card .rc-blood { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 0.4rem; }
.result-card .rc-hospital { font-size: 0.9rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.3rem; }
.result-card .rc-units { font-size: 0.85rem; color: var(--text-sec); margin-bottom: 0.75rem; }
.result-card .rc-status { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; }
.rc-status.available { background: rgba(16,185,129,0.1); color: #10b981; }
.rc-status.low { background: rgba(245,158,11,0.1); color: #f59e0b; }
.rc-status.critical { background: rgba(220,38,38,0.1); color: #dc2626; }

