/* High Priority Login Modal Reset - Override conflicting styles */
.login-modal * {
    box-sizing: border-box;
}

.login-modal .modal-footer,
.login-modal .modal-header,
.login-modal .modal-content {
    /* Reset all potentially conflicting properties */
    position: static !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    z-index: auto !important;
    border-radius: 0 !important;
    overflow: visible !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: block !important;
}

/* User Profile Styles */
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile {
    position: relative;
    cursor: pointer;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.2);
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.username {
    color: #1a1a1a;
    font-size: 0.9rem;
    font-weight: 600;
}

.fa-chevron-down {
    color: white;
    font-size: 0.8rem;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

/* Dropdown Styles */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.dropdown-profile-pic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.full-name {
    font-weight: 600;
    color: #333;
}

.email {
    font-size: 0.8rem;
    color: #666;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 0;
}

.dropdown-content {
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: 'Urbanist', system-ui, sans-serif;
    font-size: 0.9rem;
    position: relative;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item i {
    width: 16px;
    color: #666;
}

.logout-item {
    color: #dc3545;
}

.logout-item i {
    color: #dc3545;
}

/* Coming Soon Tooltip */
.feature-tooltip {
    position: fixed;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.feature-tooltip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 6px 6px 0;
    border-style: solid;
    border-color: transparent #333 transparent transparent;
}

.feature-tooltip.fade-out {
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Modern Login Modal Styles */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
    animation: modalFadeIn 0.4s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(12px);
    }
}

.login-modal .login-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    margin: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(32px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Step System */
.login-modal .login-step {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(32px);
}

.login-modal .login-step.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    transform: translateX(0);
    animation: stepSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes stepSlideIn {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-modal .step-content {
    padding: 32px 32px 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 24px;
    overflow-y: auto;
}

/* Step 1: Welcome */
.login-modal .welcome-header {
    text-align: center;
    margin-bottom: 4px;
}

.login-modal .logo-container {
    margin-bottom: 16px;
}

.login-modal .welcome-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.2));
    transition: transform 0.3s ease;
}

.login-modal .welcome-logo:hover {
    transform: scale(1.05) rotate(2deg);
}

.login-modal .welcome-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 8px 0;
    letter-spacing: -0.025em;
    line-height: 1.2;
    white-space: nowrap;
}

.login-modal .tagline {
    font-size: 1rem;
    color: #64748b;
    margin: 0 0 12px 0;
    font-weight: 500;
    line-height: 1.4;
}

.login-modal .version-pill {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.login-modal .welcome-content .description {
    font-size: 1rem;
    line-height: 1.5;
    color: #475569;
    text-align: center;
    margin: 0 0 20px 0;
}

.login-modal .highlight-stats {
    display: grid;
    gap: 12px;
    margin-bottom: 8px;
}

.login-modal .stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.3s ease;
}

.login-modal .stat-item:hover {
    background: rgba(241, 245, 249, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.login-modal .stat-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 10px;
    flex-shrink: 0;
}

.login-modal .stat-icon i {
    font-size: 1.125rem;
    color: #6366f1;
}

.login-modal .stat-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.login-modal .stat-text strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.login-modal .stat-text span {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.3;
}

/* Step 2: Privacy & Research */
.login-modal .step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.login-modal .step-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    flex: 1;
    text-align: center;
    line-height: 1.3;
}

.login-modal .back-btn {
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
    flex-shrink: 0;
}

.login-modal .back-btn:hover {
    background: rgba(241, 245, 249, 0.9);
    color: #475569;
    transform: translateX(-2px);
}

.login-modal .step-indicator {
    font-size: 0.75rem;
    color: #64748b;
    background: rgba(248, 250, 252, 0.8);
    padding: 4px 8px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    flex-shrink: 0;
}

.login-modal .info-cards {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.login-modal .info-card {
    padding: 20px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.3s ease;
}

.login-modal .info-card:hover {
    background: rgba(241, 245, 249, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.login-modal .card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1.125rem;
    color: white;
}

.login-modal .card-icon.privacy {
    background: linear-gradient(135deg, #10b981, #059669);
}

.login-modal .card-icon.research {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.login-modal .card-icon.usage {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.login-modal .info-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.login-modal .info-card p {
    font-size: 0.875rem;
    line-height: 1.4;
    color: #475569;
    margin: 0;
}

.login-modal .research-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    margin-bottom: 4px;
}

.login-modal .partner-logo {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.login-modal .research-badge span {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

/* Step 3: Sign In */
.login-modal .signin-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-modal .signin-description p {
    font-size: 1rem;
    line-height: 1.5;
    color: #475569;
    text-align: center;
    margin: 0;
}

.login-modal .signin-benefits {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-modal .benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: #475569;
}

.login-modal .benefit-item i {
    color: #10b981;
    font-size: 0.875rem;
}

.login-modal .signin-action {
    margin: 4px 0;
}

.login-modal .google-signin-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Urbanist', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.login-modal .google-signin-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.login-modal .google-signin-btn img {
    width: 20px;
    height: 20px;
}

/* Action Buttons */
.login-modal .step-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.login-modal .primary-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: 'Urbanist', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.login-modal .primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.login-modal .secondary-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.login-modal .link-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6366f1;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-modal .link-btn:hover {
    color: #4f46e5;
    transform: translateY(-1px);
}

.login-modal .terms-notice {
    text-align: center;
}

.login-modal .terms-notice p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.login-modal .terms-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.login-modal .terms-link:hover {
    text-decoration: underline;
}

/* Modal Footer */
.login-modal .modal-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px 32px 20px !important;
    border-top: 1px solid rgba(226, 232, 240, 0.6) !important;
    background: rgba(248, 250, 252, 0.5) !important;
    position: relative !important;
    bottom: auto !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: auto !important;
}

.login-modal .footer-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
}

.login-modal .separator {
    opacity: 0.5;
}

.login-modal .institution {
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 640px) {
    .login-modal {
        padding: 16px;
    }
    
    .login-modal .login-modal-content {
        max-width: 100%;
        border-radius: 20px;
        max-height: 90vh;
    }
    
    .login-modal .step-content {
        padding: 24px 20px 16px;
        gap: 20px;
    }
    
    .login-modal .welcome-header h1 {
        font-size: 1.5rem;
    }
    
    .login-modal .step-header h2 {
        font-size: 1.25rem;
    }
    
    .login-modal .modal-footer {
        padding: 12px 20px 16px !important;
    }
    
    .login-modal .footer-info {
        flex-direction: column;
        gap: 2px;
        font-size: 0.7rem;
    }
    
    .login-modal .separator {
        display: none;
    }
}

@media (max-height: 700px) {
    .login-modal .step-content {
        padding: 20px 24px 16px;
        gap: 16px;
    }
    
    .login-modal .welcome-logo {
        width: 48px;
        height: 48px;
    }
    
    .login-modal .welcome-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-height: 600px) {
    .login-modal {
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .login-modal .step-content {
        padding: 16px 20px 12px;
        gap: 12px;
    }
    
    .login-modal .highlight-stats {
        gap: 8px;
    }
    
    .login-modal .stat-item {
        padding: 12px;
    }
    
    .login-modal .info-cards {
        gap: 12px;
    }
    
    .login-modal .info-card {
        padding: 16px;
    }
}

