/* Shared Header Styles - Enhanced with User Management */

.header {
    background: white;
    padding: 0.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.logo-section:hover {
    opacity: 0.8;
}

.logo-img {
    height: 120px;
    width: auto;
    object-fit: cover;
    object-position: center;
}

.beta-badge {
    background: #2196F3;
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
}

.auth-section {
    display: flex;
    align-items: center;
}

.sign-in-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sign-in-btn:hover {
    background: #1976D2;
}

.user-menu {
    position: relative;
    display: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.user-info:hover {
    background: #f5f5f5;
}

.user-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-arrow {
    font-size: 10px;
    color: #666;
    transition: transform 0.2s;
}

.user-menu.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    min-width: 280px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    border: 1px solid #e1e5e9;
    overflow: hidden;
}

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

.dropdown-header {
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e1e5e9;
}

.user-avatar-large-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name-large {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 1rem;
}

.user-email {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 8px;
    word-break: break-word;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.premium-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.free-badge {
    background: #e9ecef;
    color: #6c757d;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-count {
    font-size: 0.75rem;
    color: #495057;
    background: #fff3cd;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
}

.dropdown-section {
    padding: 0.5rem 0;
}

.dropdown-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.25rem;
    margin-bottom: 0.25rem;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1.25rem;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #2c3e50;
    transform: translateX(2px);
}

.dropdown-item.current-page {
    background: #e3f2fd;
    color: #1976D2;
    font-weight: 600;
}

.dropdown-item.current-page:hover {
    background: #bbdefb;
}

.dropdown-item.premium-upgrade {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    font-weight: 600;
}

.dropdown-item.premium-upgrade:hover {
    background: linear-gradient(135deg, #ffe0b2 0%, #ffcc80 100%);
    transform: translateX(4px);
}

.dropdown-item.logout-item {
    color: #dc3545;
    border-top: 1px solid #e9ecef;
    margin-top: 0.5rem;
}

.dropdown-item.logout-item:hover {
    background: #f8d7da;
    color: #721c24;
}

.dropdown-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    
    .logo-img {
        height: 80px;
    }
    
    .user-dropdown {
        min-width: 260px;
        right: -10px;
    }
    
    .dropdown-header {
        padding: 1rem;
    }
    
    .user-avatar-large-img {
        width: 40px;
        height: 40px;
    }
    
    .dropdown-item {
        padding: 0.875rem 1rem;
    }
    
    .dropdown-section-title {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .user-dropdown {
        min-width: 240px;
        right: -20px;
    }
    
    .user-name-large {
        font-size: 0.9rem;
    }
    
    .user-email {
        font-size: 0.75rem;
    }
}

/* Animation for dropdown items */
.dropdown-item {
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #2196F3;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
}

.dropdown-item:hover::before,
.dropdown-item.current-page::before {
    transform: translateX(0);
}

.dropdown-item.premium-upgrade::before {
    background: #ff9800;
}

.dropdown-item.logout-item::before {
    background: #dc3545;
}

/* Loading states */
.dropdown-item:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dropdown-item:disabled:hover {
    background: none;
    transform: none;
}

/* Focus states for accessibility */
.dropdown-item:focus {
    outline: 2px solid #2196F3;
    outline-offset: -2px;
}

/* Smooth transitions */
* {
    transition: all 0.2s ease;
}