/* Profile Dropdown Styles */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-icon {
    transition: transform 0.3s ease;
}

.profile-btn:hover .dropdown-icon {
    transform: translateY(2px);
}

/* Profile Menu */
.profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 280px;
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.profile-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-header {
    padding: 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-menu-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-menu-email {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
}

.profile-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0;
}

.profile-menu-items {
    padding: 8px 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.profile-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-primary);
}

.profile-menu-item i {
    font-size: 1.25rem;
    opacity: 0.8;
}

.profile-menu-item.logout {
    color: #ef4444;
}

.profile-menu-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .profile-name {
        display: none;
    }

    .profile-btn {
        padding: 8px 12px;
    }

    .profile-menu {
        right: -10px;
        min-width: 260px;
    }

    .dropdown-icon {
        display: none;
    }
}

/* Light Theme Adjustments */
[data-theme="light"] .profile-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .profile-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .profile-menu {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .profile-menu-header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(6, 182, 212, 0.05));
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .profile-menu-divider {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .profile-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-menu.show {
    animation: slideDown 0.3s ease;
}
